From e1a4ed87f2f937d95a0adc1b5ee70033623845ca Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Thu, 1 Feb 2018 14:52:01 +0800 Subject: [PATCH] add #[allow(unused)] for compatibility --- src/fs/file.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fs/file.rs b/src/fs/file.rs index 452a7c4..ad643d7 100644 --- a/src/fs/file.rs +++ b/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 /// within ASCII, so it’s alright. fn ext(path: &Path) -> Option { + #[allow(unused)] + use std::ascii::AsciiExt; + let name = match path.file_name() { Some(f) => f.to_string_lossy().to_string(), None => return None,