Skip to content

Commit fa6ef22

Browse files
committed
🎨 style: consolidate error handling to single line
- Merge multi-line return statement for better readability - Ensure consistent code formatting per cargo fmt standards - Pass cargo fmt --check validation
1 parent 0d37b08 commit fa6ef22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/basic/websocket_client.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
5555
Ok(builder) => builder.build(),
5656
Err(e) => {
5757
eprintln!("❌ Failed to register event handler: {e}");
58-
return Err(Box::new(std::io::Error::other(e))
59-
as Box<dyn std::error::Error>);
58+
return Err(Box::new(std::io::Error::other(e)) as Box<dyn std::error::Error>);
6059
}
6160
};
6261

0 commit comments

Comments
 (0)