1
0
Эх сурвалжийг харах

add #[allow(unused)] for compatibility

Ryan Leung 8 жил өмнө
parent
commit
e1a4ed87f2
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      src/fs/file.rs

+ 3 - 0
src/fs/file.rs

@@ -95,6 +95,9 @@ impl<'dir> File<'dir> {
     /// against a pre-compiled list of extensions which are known to only exist
     /// against a pre-compiled list of extensions which are known to only exist
     /// within ASCII, so it’s alright.
     /// within ASCII, so it’s alright.
     fn ext(path: &Path) -> Option<String> {
     fn ext(path: &Path) -> Option<String> {
+        #[allow(unused)]
+        use std::ascii::AsciiExt;
+
         let name = match path.file_name() {
         let name = match path.file_name() {
             Some(f) => f.to_string_lossy().to_string(),
             Some(f) => f.to_string_lossy().to_string(),
             None => return None,
             None => return None,