mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-27 04:59:02 +02:00
add future::Either type to utils (#305)
This commit is contained in:
@ -9,7 +9,7 @@ use core::marker::PhantomData;
|
||||
use actix_service::{
|
||||
apply, ApplyTransform, IntoServiceFactory, Service, ServiceFactory, Transform,
|
||||
};
|
||||
use futures_util::future::{ok, Either, Ready};
|
||||
use actix_utils::future::{ok, Either, Ready};
|
||||
use tracing_futures::{Instrument, Instrumented};
|
||||
|
||||
/// A `Service` implementation that automatically enters/exits tracing spans
|
||||
@ -48,9 +48,9 @@ where
|
||||
.clone()
|
||||
.map(|span| tracing::span!(parent: &span, tracing::Level::INFO, "future"))
|
||||
{
|
||||
Either::Right(fut.instrument(span))
|
||||
Either::right(fut.instrument(span))
|
||||
} else {
|
||||
Either::Left(fut)
|
||||
Either::left(fut)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user