use common callback

This commit is contained in:
yggverse 2025-02-10 00:17:08 +02:00
parent 582744f830
commit 83b29c0276

View file

@ -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))),