Skip to content

Commit

Permalink
Merge #1760
Browse files Browse the repository at this point in the history
1760: remove redundant imports and clone (found by clippy) r=pksunkara a=matthiaskrgr



Co-authored-by: Matthias Krüger <[email protected]>
  • Loading branch information
bors[bot] and matthiaskrgr authored Mar 25, 2020
2 parents 7a65205 + 428a075 commit d8434ec
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 24 deletions.
2 changes: 0 additions & 2 deletions src/build/arg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ use std::str;

// Third Party
use crate::util::VecMap;
#[cfg(feature = "yaml")]
use yaml_rust;

// Internal
use crate::build::{arg::settings::ArgFlags, usage_parser::UsageParser};
Expand Down
4 changes: 0 additions & 4 deletions src/build/arg_group.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Std
use std::fmt::{Debug, Formatter, Result};

// Third Party
#[cfg(feature = "yaml")]
use yaml_rust;

// Internal
use crate::util::Key;

Expand Down
2 changes: 0 additions & 2 deletions src/output/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use ansi_term::ANSIString;
#[cfg(all(feature = "color", not(target_os = "windows")))]
use ansi_term::Colour::{Green, Red, Yellow};

#[cfg(feature = "color")]
use atty;
use std::env;
use std::fmt;

Expand Down
4 changes: 0 additions & 4 deletions src/output/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ use crate::parse::Parser;
use crate::util::VecMap;
use crate::INTERNAL_ERROR_MSG;

// Third Party
#[cfg(feature = "wrap_help")]
use term_size;
use textwrap;
use unicode_width::UnicodeWidthStr;

#[cfg(not(feature = "wrap_help"))]
Expand Down
3 changes: 0 additions & 3 deletions src/parse/arg_matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ use std::ffi::OsStr;
use std::mem;
use std::ops::Deref;

// Third Party
use indexmap;

// Internal
use crate::build::{Arg, ArgSettings};
use crate::parse::{ArgMatches, MatchedArg, SubCommand};
Expand Down
6 changes: 1 addition & 5 deletions src/parse/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,11 +1004,7 @@ impl Error {
});
Error {
cause: format!("The argument '{}' wasn't found", a),
message: format!(
"{} The argument '{}' wasn't found",
c.error("error:"),
a.clone()
),
message: format!("{} The argument '{}' wasn't found", c.error("error:"), a),
kind: ErrorKind::ArgumentNotFound,
info: Some(vec![a]),
}
Expand Down
4 changes: 0 additions & 4 deletions src/parse/features/suggestions.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#[cfg(feature = "suggestions")]
use std::cmp::Ordering;

// Third Party
#[cfg(feature = "suggestions")]
use strsim;

// Internal
use crate::build::App;
use crate::output::fmt::Format;
Expand Down

0 comments on commit d8434ec

Please sign in to comment.