chore: cargo clippy

This commit is contained in:
sigoden
2022-11-10 15:38:35 +08:00
parent dbf2de9cb9
commit bd07783cde
4 changed files with 12 additions and 12 deletions

View File

@@ -593,7 +593,7 @@ impl Server {
None
};
if let Some(mime) = mime_guess::from_path(&path).first() {
if let Some(mime) = mime_guess::from_path(path).first() {
res.headers_mut().typed_insert(ContentType::from(mime));
} else {
res.headers_mut().insert(
@@ -902,7 +902,7 @@ impl Server {
Some(path) => path,
None => return None,
};
Some(self.args.path.join(&stripped_path))
Some(self.args.path.join(stripped_path))
}
fn strip_path_prefix<'a, P: AsRef<Path>>(&self, path: &'a P) -> Option<&'a Path> {