This commit is contained in:
Edward Shen 2021-03-22 20:00:21 -04:00
parent 48dc68e680
commit afb4a1b47f
Signed by: edward
GPG key ID: 19182661E818369F
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,6 @@
#![warn(clippy::pedantic, clippy::nursery)] #![warn(clippy::pedantic, clippy::nursery)]
#![allow(clippy::future_not_send)] // We're end users, so this is ok // We're end users, so these is ok
#![allow(clippy::future_not_send, clippy::module_name_repetitions)]
use std::env::{self, VarError}; use std::env::{self, VarError};
use std::path::PathBuf; use std::path::PathBuf;
@ -120,7 +121,7 @@ impl Config {
let memory_quota = env::var("MEM_CACHE_QUOTA_BYTES")?.parse()?; let memory_quota = env::var("MEM_CACHE_QUOTA_BYTES")?.parse()?;
let network_speed = env::var("MAX_NETWORK_SPEED")?.parse()?; let network_speed = env::var("MAX_NETWORK_SPEED")?.parse()?;
let disk_path = env::var("DISK_CACHE_PATH") let disk_path = env::var("DISK_CACHE_PATH")
.unwrap_or("./cache".to_string()) .unwrap_or_else(|_| "./cache".to_string())
.parse() .parse()
.unwrap(); .unwrap();

View file

@ -33,6 +33,7 @@ impl<'a> Request<'a> {
} }
} }
#[allow(clippy::fallible_impl_from)]
impl<'a> From<&'a Config> for Request<'a> { impl<'a> From<&'a Config> for Request<'a> {
fn from(config: &'a Config) -> Self { fn from(config: &'a Config) -> Self {
Self { Self {