Skip to content

Commit dd97416

Browse files
committed
docs: Fix typos
1 parent 60aac47 commit dd97416

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

src/build/app/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -821,15 +821,15 @@ impl<'help> App<'help> {
821821
/// Does awesome things\n\
822822
/// (C) [email protected]\n\n\
823823
///
824-
/// USAGE: myapp <opts> <comamnd>\n\n\
824+
/// USAGE: myapp <opts> <command>\n\n\
825825
///
826826
/// Options:\n\
827827
/// -h, --help Display this message\n\
828828
/// -V, --version Display version info\n\
829829
/// -s <stuff> Do something with stuff\n\
830830
/// -v Be verbose\n\n\
831831
///
832-
/// Commmands:\n\
832+
/// Commands:\n\
833833
/// help Print this message\n\
834834
/// work Do some work")
835835
/// # ;
@@ -2490,7 +2490,7 @@ impl<'help> App<'help> {
24902490

24912491
// Remove generated help and version args in the subcommand
24922492
//
2493-
// Don't remove if those args are futher mutated
2493+
// Don't remove if those args are further mutated
24942494
if is_generated {
24952495
let generated_pos = sc
24962496
.args
@@ -2743,7 +2743,7 @@ impl<'help> App<'help> {
27432743
// Print val_name for positional arguments. e.g. <file_name>
27442744
x.name_no_brackets().to_string()
27452745
} else {
2746-
// Print useage string for flags arguments, e.g. <--help>
2746+
// Print usage string for flags arguments, e.g. <--help>
27472747
x.to_string()
27482748
}
27492749
})

src/build/arg/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4367,7 +4367,7 @@ impl<'help> Arg<'help> {
43674367
/// assert_eq!(files, ["file1", "file2", "file3"]);
43684368
/// ```
43694369
///
4370-
/// Although `MultipleVlaues` has been specified, we cannot use the argument more than once.
4370+
/// Although `MultipleValues` has been specified, we cannot use the argument more than once.
43714371
///
43724372
/// ```rust
43734373
/// # use clap::{App, Arg, ErrorKind, ArgSettings};
@@ -5120,7 +5120,7 @@ where
51205120
}
51215121
}
51225122
} else if let Some(num_vals) = arg.num_vals {
5123-
// If number_of_values is sepcified, display the value multiple times.
5123+
// If number_of_values is specified, display the value multiple times.
51245124
let arg_name = format!("<{}>", arg.name);
51255125
let mut it = iter::repeat(&arg_name).take(num_vals).peekable();
51265126
while let Some(arg_name) = it.next() {

src/build/arg/possible_value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<'help> PossibleValue<'help> {
107107

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

src/output/help.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ mod test {
10391039

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

typos.toml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
files.extend-exclude = [
2+
"CHANGELOG.md",
3+
"tests",
4+
]
5+
[default.extend-words]
6+
# Acronyms
7+
als = "als"
8+
lits = "lits"

0 commit comments

Comments
 (0)