mirror of
https://github.com/clap-rs/clap
synced 2025-01-18 23:53:54 +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
|
// Third Party
|
||||||
use crate::util::VecMap;
|
use crate::util::VecMap;
|
||||||
#[cfg(feature = "yaml")]
|
|
||||||
use yaml_rust;
|
|
||||||
|
|
||||||
// Internal
|
// Internal
|
||||||
use crate::build::{arg::settings::ArgFlags, usage_parser::UsageParser};
|
use crate::build::{arg::settings::ArgFlags, usage_parser::UsageParser};
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
// Std
|
// Std
|
||||||
use std::fmt::{Debug, Formatter, Result};
|
use std::fmt::{Debug, Formatter, Result};
|
||||||
|
|
||||||
// Third Party
|
|
||||||
#[cfg(feature = "yaml")]
|
|
||||||
use yaml_rust;
|
|
||||||
|
|
||||||
// Internal
|
// Internal
|
||||||
use crate::util::Key;
|
use crate::util::Key;
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@ use ansi_term::ANSIString;
|
||||||
#[cfg(all(feature = "color", not(target_os = "windows")))]
|
#[cfg(all(feature = "color", not(target_os = "windows")))]
|
||||||
use ansi_term::Colour::{Green, Red, Yellow};
|
use ansi_term::Colour::{Green, Red, Yellow};
|
||||||
|
|
||||||
#[cfg(feature = "color")]
|
|
||||||
use atty;
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,6 @@ use crate::parse::Parser;
|
||||||
use crate::util::VecMap;
|
use crate::util::VecMap;
|
||||||
use crate::INTERNAL_ERROR_MSG;
|
use crate::INTERNAL_ERROR_MSG;
|
||||||
|
|
||||||
// Third Party
|
|
||||||
#[cfg(feature = "wrap_help")]
|
|
||||||
use term_size;
|
|
||||||
use textwrap;
|
|
||||||
use unicode_width::UnicodeWidthStr;
|
use unicode_width::UnicodeWidthStr;
|
||||||
|
|
||||||
#[cfg(not(feature = "wrap_help"))]
|
#[cfg(not(feature = "wrap_help"))]
|
||||||
|
|
|
@ -4,9 +4,6 @@ use std::ffi::OsStr;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
|
||||||
// Third Party
|
|
||||||
use indexmap;
|
|
||||||
|
|
||||||
// Internal
|
// Internal
|
||||||
use crate::build::{Arg, ArgSettings};
|
use crate::build::{Arg, ArgSettings};
|
||||||
use crate::parse::{ArgMatches, MatchedArg, SubCommand};
|
use crate::parse::{ArgMatches, MatchedArg, SubCommand};
|
||||||
|
|
|
@ -1004,11 +1004,7 @@ impl Error {
|
||||||
});
|
});
|
||||||
Error {
|
Error {
|
||||||
cause: format!("The argument '{}' wasn't found", a),
|
cause: format!("The argument '{}' wasn't found", a),
|
||||||
message: format!(
|
message: format!("{} The argument '{}' wasn't found", c.error("error:"), a),
|
||||||
"{} The argument '{}' wasn't found",
|
|
||||||
c.error("error:"),
|
|
||||||
a.clone()
|
|
||||||
),
|
|
||||||
kind: ErrorKind::ArgumentNotFound,
|
kind: ErrorKind::ArgumentNotFound,
|
||||||
info: Some(vec![a]),
|
info: Some(vec![a]),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
#[cfg(feature = "suggestions")]
|
#[cfg(feature = "suggestions")]
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
|
|
||||||
// Third Party
|
|
||||||
#[cfg(feature = "suggestions")]
|
|
||||||
use strsim;
|
|
||||||
|
|
||||||
// Internal
|
// Internal
|
||||||
use crate::build::App;
|
use crate::build::App;
|
||||||
use crate::output::fmt::Format;
|
use crate::output::fmt::Format;
|
||||||
|
|
Loading…
Reference in a new issue