mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 06:25:10 +01:00
Fix clippy::manual_inspect lints
This commit is contained in:
parent
76e2726803
commit
1ea69cf4dc
2 changed files with 3 additions and 12 deletions
|
@ -54,18 +54,12 @@ where
|
|||
tokio::spawn(async move {
|
||||
let tcp_listener = tokio::net::TcpListener::bind(address)
|
||||
.await
|
||||
.map_err(|err| {
|
||||
stop_token.stop();
|
||||
err
|
||||
})
|
||||
.inspect_err(|_| stop_token.stop())
|
||||
.expect("Couldn't bind to the address");
|
||||
axum::serve(tcp_listener, app)
|
||||
.with_graceful_shutdown(stop_flag)
|
||||
.await
|
||||
.map_err(|err| {
|
||||
stop_token.stop();
|
||||
err
|
||||
})
|
||||
.inspect_err(|_| stop_token.stop())
|
||||
.expect("Axum server error");
|
||||
});
|
||||
|
||||
|
|
|
@ -122,10 +122,7 @@ impl DispatcherState {
|
|||
.map(ShutdownState::from_u8)
|
||||
.map_err(ShutdownState::from_u8)
|
||||
// FIXME: `Result::inspect` when :(
|
||||
.map(|st| {
|
||||
self.notify.notify_waiters();
|
||||
st
|
||||
})
|
||||
.inspect(|_| self.notify.notify_waiters())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue