Skip to content

Commit 1086ca2

Browse files
committed
fix warning on windows
1 parent 13eecc8 commit 1086ca2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/webserver/routing.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::{file_cache::FileCache, AppState};
44
use awc::http::uri::PathAndQuery;
55
use log::debug;
66
use percent_encoding;
7-
use std::ffi::OsString;
87
use std::path::{Path, PathBuf};
98
use RoutingAction::{CustomNotFound, Execute, NotFound, Redirect, Serve};
109

@@ -94,7 +93,9 @@ where
9493
let decoded = percent_encoding::percent_decode_str(path);
9594
#[cfg(unix)]
9695
{
96+
use std::ffi::OsString;
9797
use std::os::unix::ffi::OsStringExt;
98+
9899
let decoded = decoded.collect::<Vec<u8>>();
99100
Ok(PathBuf::from(OsString::from_vec(decoded)))
100101
}

0 commit comments

Comments
 (0)