Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove redundant imports and clone (found by clippy) #1760

Merged
merged 1 commit into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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