chore(deps): bump http, hyper etc. to 1.0; jsonrpsee 0.23 (#7018)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
DaniPopes
2024-06-11 11:37:49 +02:00
committed by GitHub
parent e9d8cdab49
commit 55317eb004
26 changed files with 554 additions and 608 deletions

View File

@ -13,8 +13,6 @@ use std::{
use tokio::sync::oneshot;
/// A Future that resolves when the shutdown event has been fired.
///
/// The [`TaskManager`](crate)
#[derive(Debug)]
pub struct GracefulShutdown {
shutdown: Shutdown,
@ -25,6 +23,13 @@ impl GracefulShutdown {
pub(crate) fn new(shutdown: Shutdown, guard: GracefulShutdownGuard) -> Self {
Self { shutdown, guard: Some(guard) }
}
/// Returns a new shutdown future that is ignores the returned [`GracefulShutdownGuard`].
///
/// This just maps the return value of the future to `()`, it does not drop the guard.
pub fn ignore_guard(self) -> impl Future<Output = ()> + Send + Sync + Unpin + 'static {
self.map(drop)
}
}
impl Future for GracefulShutdown {