docs: Fix typos

This commit is contained in:
Ed Page 2021-11-17 15:21:31 -06:00
parent 60aac4760a
commit dd974168fd
5 changed files with 16 additions and 8 deletions

View file

@ -821,7 +821,7 @@ impl<'help> App<'help> {
/// Does awesome things\n\ /// Does awesome things\n\
/// (C) me@mail.com\n\n\ /// (C) me@mail.com\n\n\
/// ///
/// USAGE: myapp <opts> <comamnd>\n\n\ /// USAGE: myapp <opts> <command>\n\n\
/// ///
/// Options:\n\ /// Options:\n\
/// -h, --help Display this message\n\ /// -h, --help Display this message\n\
@ -829,7 +829,7 @@ impl<'help> App<'help> {
/// -s <stuff> Do something with stuff\n\ /// -s <stuff> Do something with stuff\n\
/// -v Be verbose\n\n\ /// -v Be verbose\n\n\
/// ///
/// Commmands:\n\ /// Commands:\n\
/// help Print this message\n\ /// help Print this message\n\
/// work Do some work") /// work Do some work")
/// # ; /// # ;
@ -2490,7 +2490,7 @@ impl<'help> App<'help> {
// Remove generated help and version args in the subcommand // Remove generated help and version args in the subcommand
// //
// Don't remove if those args are futher mutated // Don't remove if those args are further mutated
if is_generated { if is_generated {
let generated_pos = sc let generated_pos = sc
.args .args
@ -2743,7 +2743,7 @@ impl<'help> App<'help> {
// Print val_name for positional arguments. e.g. <file_name> // Print val_name for positional arguments. e.g. <file_name>
x.name_no_brackets().to_string() x.name_no_brackets().to_string()
} else { } else {
// Print useage string for flags arguments, e.g. <--help> // Print usage string for flags arguments, e.g. <--help>
x.to_string() x.to_string()
} }
}) })

View file

@ -4367,7 +4367,7 @@ impl<'help> Arg<'help> {
/// assert_eq!(files, ["file1", "file2", "file3"]); /// assert_eq!(files, ["file1", "file2", "file3"]);
/// ``` /// ```
/// ///
/// Although `MultipleVlaues` has been specified, we cannot use the argument more than once. /// Although `MultipleValues` has been specified, we cannot use the argument more than once.
/// ///
/// ```rust /// ```rust
/// # use clap::{App, Arg, ErrorKind, ArgSettings}; /// # use clap::{App, Arg, ErrorKind, ArgSettings};
@ -5120,7 +5120,7 @@ where
} }
} }
} else if let Some(num_vals) = arg.num_vals { } else if let Some(num_vals) = arg.num_vals {
// If number_of_values is sepcified, display the value multiple times. // If number_of_values is specified, display the value multiple times.
let arg_name = format!("<{}>", arg.name); let arg_name = format!("<{}>", arg.name);
let mut it = iter::repeat(&arg_name).take(num_vals).peekable(); let mut it = iter::repeat(&arg_name).take(num_vals).peekable();
while let Some(arg_name) = it.next() { while let Some(arg_name) = it.next() {

View file

@ -107,7 +107,7 @@ impl<'help> PossibleValue<'help> {
impl<'help> PossibleValue<'help> { impl<'help> PossibleValue<'help> {
/// Creates a new instance of [`PossibleValue`] using a string name. The name will be used to /// Creates a new instance of [`PossibleValue`] using a string name. The name will be used to
/// decide wether this value was provided by the user to an argument. /// decide whether this value was provided by the user to an argument.
/// ///
/// **NOTE:** In case it is not [hidden] it will also be shown in help messages for arguments /// **NOTE:** In case it is not [hidden] it will also be shown in help messages for arguments
/// that use it as a [possible value] and have not hidden them through [`Arg::hide_possible_values(true)`]. /// that use it as a [possible value] and have not hidden them through [`Arg::hide_possible_values(true)`].

View file

@ -1039,7 +1039,7 @@ mod test {
#[test] #[test]
fn display_width_handles_non_ascii() { fn display_width_handles_non_ascii() {
// Popular Danish tounge-twister, the name of a fruit dessert. // Popular Danish tongue-twister, the name of a fruit dessert.
let text = "rødgrød med fløde"; let text = "rødgrød med fløde";
assert_eq!(display_width(text), 17); assert_eq!(display_width(text), 17);
// Note that the string width is smaller than the string // Note that the string width is smaller than the string

8
typos.toml Normal file
View file

@ -0,0 +1,8 @@
files.extend-exclude = [
"CHANGELOG.md",
"tests",
]
[default.extend-words]
# Acronyms
als = "als"
lits = "lits"