Skip to content

Commit

Permalink
use common callback
Browse files Browse the repository at this point in the history
  • Loading branch information
yggverse committed Feb 9, 2025
1 parent 582744f commit 83b29c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ impl Client {
request,
priority,
cancellable,
move |result| match result {
Ok(response) => callback(Ok(response)),
Err(e) => callback(Err(Error::Connection(e))),
move |result| {
callback(match result {
Ok(response) => Ok(response),
Err(e) => Err(Error::Connection(e)),
})
},
),
Err(e) => callback(Err(Error::Connection(e))),
Expand Down

0 comments on commit 83b29c0

Please sign in to comment.