Bläddra i källkod

Fix a couple warnings

Benjamin Sago 6 år sedan
förälder
incheckning
df9b32c892
3 ändrade filer med 1 tillägg och 4 borttagningar
  1. 1 1
      src/fs/feature/git.rs
  2. 0 2
      src/options/mod.rs
  3. 0 1
      src/output/details.rs

+ 1 - 1
src/fs/feature/git.rs

@@ -53,7 +53,7 @@ impl FromIterator<PathBuf> for GitCache {
             else {
                 match GitRepo::discover(path) {
                     Ok(r) => {
-                        if let Some(mut r2) = git.repos.iter_mut().find(|e| e.has_workdir(&r.workdir)) {
+                        if let Some(r2) = git.repos.iter_mut().find(|e| e.has_workdir(&r.workdir)) {
                             debug!("Adding to existing repo (workdir matches with {:?})", r2.workdir);
                             r2.extra_paths.push(r.original_path);
                             continue;

+ 0 - 2
src/options/mod.rs

@@ -123,7 +123,6 @@ impl Options {
     where I: IntoIterator<Item=&'args OsString>,
           V: Vars {
         use options::parser::{Matches, Strictness};
-        use options::vars;
 
         let strictness = match vars.get(vars::EXA_STRICT) {
             None                         => Strictness::UseLastArguments,
@@ -191,7 +190,6 @@ pub mod test {
     {
         use self::Strictnesses::*;
         use options::parser::{Args, Strictness};
-        use std::ffi::OsString;
 
         let bits = inputs.into_iter().map(|&o| os(o)).collect::<Vec<OsString>>();
         let mut result = Vec::new();

+ 0 - 1
src/output/details.rs

@@ -143,7 +143,6 @@ impl<'a> AsRef<File<'a>> for Egg<'a> {
 
 impl<'a> Render<'a> {
     pub fn render<W: Write>(self, mut git: Option<&'a GitCache>, ignore: Option<&'a IgnoreCache>, w: &mut W) -> IOResult<()> {
-        use num_cpus;
         let mut pool = Pool::new(num_cpus::get() as u32);
         let mut rows = Vec::new();