Reduced tokio featureset
This commit is contained in:
parent
e0abe6344b
commit
3da18ca530
|
@ -10,13 +10,13 @@ documentation = "https://docs.rs/northstar"
|
|||
|
||||
[features]
|
||||
default = ["serve_dir"]
|
||||
serve_dir = ["mime_guess"]
|
||||
serve_dir = ["mime_guess", "tokio/fs"]
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.33"
|
||||
rustls = { version = "0.18.1", features = ["dangerous_configuration"] }
|
||||
tokio-rustls = "0.20.0"
|
||||
tokio = { version = "0.3.1", features = ["full"] }
|
||||
tokio = { version = "0.3.1", features = ["io-util","net","time", "rt"] }
|
||||
mime = "0.3.16"
|
||||
uriparse = "0.6.3"
|
||||
percent-encoding = "2.1.0"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use tokio::{io::AsyncRead, fs::File};
|
||||
use tokio::io::AsyncRead;
|
||||
#[cfg(feature="serve_dir")]
|
||||
use tokio::fs::File;
|
||||
|
||||
use crate::types::Document;
|
||||
|
||||
|
@ -37,6 +39,7 @@ impl<'a> From<&'a str> for Body {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature="serve_dir")]
|
||||
impl From<File> for Body {
|
||||
fn from(file: File) -> Self {
|
||||
Self::Reader(Box::new(file))
|
||||
|
|
Loading…
Reference in a new issue