fix clippy

This commit is contained in:
fakeshadow 2021-10-14 05:39:25 +08:00
parent bf724545f3
commit 09328847b3
1 changed files with 6 additions and 4 deletions

View File

@ -62,7 +62,7 @@ type PathFilter = dyn Fn(&Path, &RequestHead) -> bool;
#[cfg(test)]
mod tests {
use std::{
fs::{self, File},
fs::{self},
ops::Add,
time::{Duration, SystemTime},
};
@ -83,6 +83,8 @@ mod tests {
use super::*;
use crate::named::File;
#[actix_rt::test]
async fn test_file_extension_to_mime() {
let m = file_extension_to_mime("");
@ -212,9 +214,9 @@ mod tests {
#[actix_rt::test]
async fn test_named_file_non_ascii_file_name() {
let mut file =
NamedFile::from_file(crate::named::File::open("Cargo.toml").unwrap(), "貨物.toml")
.unwrap();
let file = crate::named::File::open("Cargo.toml").unwrap();
let mut file = NamedFile::from_file(file, "貨物.toml").unwrap();
{
file.file();
let _f: &File = &file;