Skip to content

Commit

Permalink
clippy changes
Browse files Browse the repository at this point in the history
Signed-off-by: Shwetha N <[email protected]>
  • Loading branch information
ShwethaSNayak committed Feb 23, 2024
1 parent 7399293 commit befe20f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions golang/src/stream_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ pub unsafe extern "C" fn stream_manager_new(
client_config: ClientConfigMapping,
err: Option<&mut Buffer>,
) -> *mut StreamManager {
match catch_unwind(|| {
let result = catch_unwind(|| {
let config = client_config.to_client_config();
StreamManager::new(config)
}) {
});
match result {
Ok(manager) => {
clear_error();
Box::into_raw(Box::new(manager))
Expand Down Expand Up @@ -157,10 +158,11 @@ pub unsafe extern "C" fn stream_manager_create_stream(
err: Option<&mut Buffer>,
) -> bool {
let stream_manager = &*manager;
match catch_unwind(AssertUnwindSafe(move || {
let res = catch_unwind(AssertUnwindSafe(move || {
let stream_cfg = stream_config.to_stream_configuration();
stream_manager.create_stream(stream_cfg)
})) {
}));
match res {
Ok(result) => match result {
Ok(val) => val,
Err(e) => {
Expand Down

0 comments on commit befe20f

Please sign in to comment.