Removed unnecessary dependency on futures-rs

This commit is contained in:
Emi Tatsuo 2020-11-19 23:51:25 -05:00
parent 29c831649d
commit 5612ce1085
Signed by: Emi
GPG key ID: 68FAB2E2E6DFC98B
3 changed files with 4 additions and 4 deletions

View file

@ -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"

View file

@ -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 {

View file

@ -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")]