Removed unnecessary dependency on futures-rs
This commit is contained in:
parent
29c831649d
commit
5612ce1085
|
@ -20,7 +20,6 @@ tokio = { version = "0.3.1", features = ["io-util","net","time", "rt"] }
|
|||
mime = "0.3.16"
|
||||
uriparse = "0.6.3"
|
||||
percent-encoding = "2.1.0"
|
||||
futures-core = "0.3.7"
|
||||
log = "0.4.11"
|
||||
webpki = "0.21.0"
|
||||
lazy_static = "1.4.0"
|
||||
|
|
|
@ -7,8 +7,9 @@ use std::{
|
|||
sync::Arc,
|
||||
path::PathBuf,
|
||||
time::Duration,
|
||||
pin::Pin,
|
||||
};
|
||||
use futures_core::future::{BoxFuture, Future};
|
||||
use std::future::Future;
|
||||
use tokio::{
|
||||
prelude::*,
|
||||
io::{self, BufStream},
|
||||
|
@ -36,7 +37,7 @@ pub const REQUEST_URI_MAX_LEN: usize = 1024;
|
|||
pub const GEMINI_PORT: u16 = 1965;
|
||||
|
||||
pub (crate) type Handler = Arc<dyn Fn(Request) -> HandlerResponse + Send + Sync>;
|
||||
pub (crate) type HandlerResponse = BoxFuture<'static, Result<Response>>;
|
||||
pub (crate) type HandlerResponse = Pin<Box<dyn Future<Output = Result<Response>> + Send>>;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Server {
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::types::{Document, document::HeadingLevel::*};
|
|||
use crate::types::Response;
|
||||
use std::panic::{catch_unwind, AssertUnwindSafe};
|
||||
use std::task::Poll;
|
||||
use futures_core::future::Future;
|
||||
use std::future::Future;
|
||||
use tokio::time;
|
||||
|
||||
#[cfg(feature="serve_dir")]
|
||||
|
|
Loading…
Reference in a new issue