From 7fb0347e938eab1f0d618215d996043163735382 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Wed, 31 Jan 2018 15:05:20 +0800 Subject: [PATCH 1/2] remove unused import --- src/fs/file.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/fs/file.rs b/src/fs/file.rs index 97b3cd6..452a7c4 100644 --- a/src/fs/file.rs +++ b/src/fs/file.rs @@ -95,8 +95,6 @@ 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 { - use std::ascii::AsciiExt; - let name = match path.file_name() { Some(f) => f.to_string_lossy().to_string(), None => return None, From e1a4ed87f2f937d95a0adc1b5ee70033623845ca Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Thu, 1 Feb 2018 14:52:01 +0800 Subject: [PATCH 2/2] 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,