mirror of https://github.com/fafhrd91/actix-web
fix clippy
This commit is contained in:
parent
bf724545f3
commit
09328847b3
|
@ -62,7 +62,7 @@ type PathFilter = dyn Fn(&Path, &RequestHead) -> bool;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::{
|
use std::{
|
||||||
fs::{self, File},
|
fs::{self},
|
||||||
ops::Add,
|
ops::Add,
|
||||||
time::{Duration, SystemTime},
|
time::{Duration, SystemTime},
|
||||||
};
|
};
|
||||||
|
@ -83,6 +83,8 @@ mod tests {
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
use crate::named::File;
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn test_file_extension_to_mime() {
|
async fn test_file_extension_to_mime() {
|
||||||
let m = file_extension_to_mime("");
|
let m = file_extension_to_mime("");
|
||||||
|
@ -212,9 +214,9 @@ mod tests {
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn test_named_file_non_ascii_file_name() {
|
async fn test_named_file_non_ascii_file_name() {
|
||||||
let mut file =
|
let file = crate::named::File::open("Cargo.toml").unwrap();
|
||||||
NamedFile::from_file(crate::named::File::open("Cargo.toml").unwrap(), "貨物.toml")
|
|
||||||
.unwrap();
|
let mut file = NamedFile::from_file(file, "貨物.toml").unwrap();
|
||||||
{
|
{
|
||||||
file.file();
|
file.file();
|
||||||
let _f: &File = &file;
|
let _f: &File = &file;
|
||||||
|
|
Loading…
Reference in New Issue