mirror of https://github.com/fafhrd91/actix-web
fix foreign File::open API
This commit is contained in:
parent
3f72074270
commit
3e578e839b
|
@ -214,7 +214,17 @@ 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 file = crate::named::File::open("Cargo.toml").await.unwrap();
|
let file = {
|
||||||
|
#[cfg(feature = "io-uring")]
|
||||||
|
{
|
||||||
|
crate::named::File::open("Cargo.toml").await.unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "io-uring"))]
|
||||||
|
{
|
||||||
|
crate::named::File::open("Cargo.toml").unwrap()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
let mut file = NamedFile::from_file(file, "貨物.toml").unwrap();
|
let mut file = NamedFile::from_file(file, "貨物.toml").unwrap();
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue