mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
cargo fmt
This commit is contained in:
parent
970c1fa21a
commit
d0abb378b0
3 changed files with 13 additions and 17 deletions
|
@ -660,9 +660,10 @@ impl Attrs {
|
|||
|
||||
pub fn has_doc_methods(&self) -> bool {
|
||||
!self.doc_comment.is_empty()
|
||||
|| self.methods.iter().any(|m| {
|
||||
m.name == "about" || m.name == "long_about"
|
||||
})
|
||||
|| self
|
||||
.methods
|
||||
.iter()
|
||||
.any(|m| m.name == "about" || m.name == "long_about")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -498,10 +498,7 @@ impl<'help> Arg<'help> {
|
|||
/// -V, --version Prints version information
|
||||
/// ```
|
||||
/// [`Arg::long_help`]: ./struct.Arg.html#method.long_help
|
||||
#[deprecated(
|
||||
since = "3.0.0",
|
||||
note = "Please use `about` method instead"
|
||||
)]
|
||||
#[deprecated(since = "3.0.0", note = "Please use `about` method instead")]
|
||||
#[inline]
|
||||
pub fn help(self, h: &'help str) -> Self {
|
||||
self.about(h)
|
||||
|
@ -573,10 +570,7 @@ impl<'help> Arg<'help> {
|
|||
/// Prints version information
|
||||
/// ```
|
||||
/// [`Arg::help`]: ./struct.Arg.html#method.help
|
||||
#[deprecated(
|
||||
since = "3.0.0",
|
||||
note = "Please use `long_about` method instead"
|
||||
)]
|
||||
#[deprecated(since = "3.0.0", note = "Please use `long_about` method instead")]
|
||||
#[inline]
|
||||
pub fn long_help(self, h: &'help str) -> Self {
|
||||
self.long_about(h)
|
||||
|
|
|
@ -885,14 +885,15 @@ fn final_word_wrapping() {
|
|||
|
||||
#[test]
|
||||
fn wrapping_newline_chars() {
|
||||
let app = App::new("ctest")
|
||||
.version("0.1")
|
||||
.set_term_width(60)
|
||||
.arg(Arg::with_name("mode").about(
|
||||
"x, max, maximum 20 characters, contains symbols.\n\
|
||||
let app =
|
||||
App::new("ctest")
|
||||
.version("0.1")
|
||||
.set_term_width(60)
|
||||
.arg(Arg::with_name("mode").about(
|
||||
"x, max, maximum 20 characters, contains symbols.\n\
|
||||
l, long Copy-friendly, 14 characters, contains symbols.\n\
|
||||
m, med, medium Copy-friendly, 8 characters, contains symbols.\n",
|
||||
));
|
||||
));
|
||||
assert!(utils::compare_output(
|
||||
app,
|
||||
"ctest --help",
|
||||
|
|
Loading…
Reference in a new issue