mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
remove redundant imports and clone (found by clippy)
This commit is contained in:
parent
7a652054dc
commit
428a075e41
7 changed files with 1 additions and 24 deletions
|
@ -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};
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
// Std
|
||||
use std::fmt::{Debug, Formatter, Result};
|
||||
|
||||
// Third Party
|
||||
#[cfg(feature = "yaml")]
|
||||
use yaml_rust;
|
||||
|
||||
// Internal
|
||||
use crate::util::Key;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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"))]
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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]),
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue