Skip to content

Commit b3df99b

Browse files
committed
comment: modified some comments
1 parent 7f62070 commit b3df99b

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

src/parse/parse.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,8 @@ mod tests_of_parse_until_sub_cmd {
800800
assert_eq!(cmd.opt_arg("f#o"), None);
801801
}
802802

803-
#[test]
803+
#[test] // for the fix of issue #39
804804
fn test_if_sub_command_is_like_path() {
805-
// for the fix of issue #39
806805
let ui_args = vec![
807806
"/path/to/app".to_string(),
808807
"--foo-bar".to_string(),

src/parse/parse_for.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ pub fn make_opt_cfgs_for<T: OptStore>(opt_store: &mut T) -> Vec<OptCfg> {
3939
}
4040

4141
impl<'b> Cmd<'_> {
42-
/// Parses command line arguments and set their option values to the option store which is
43-
/// passed as an argument.
42+
/// Parses command line arguments and set their option values to the fields of the option store
43+
/// which is passed as the argument of this method.
4444
///
4545
/// This method divides command line arguments to command arguments and options, then sets
46-
/// each option value to a curresponding field of the option store.
46+
/// each option value to a corresponding field of the option store.
4747
///
4848
/// Within this method, a vector of [OptCfg] is made from the fields of the option store.
49-
/// This [OptCfg] vector is set into [Cmd] instance.
49+
/// This [OptCfg] vector is set into this [Cmd] instance.
5050
/// If you want to access this option configurations, get them by `opt_cfgs` method.
5151
///
5252
/// An option configuration corresponding to each field of an option store is determined by
@@ -68,8 +68,8 @@ impl<'b> Cmd<'_> {
6868
/// If you want to specify multiple option names, separate them with commas.
6969
/// If you want to specify multiple default values, separate them with commas and round them
7070
/// with square brackets, like `[1,2,3]`.
71-
/// If you want to use your favorite carachter as a separator, you can use it by putting it on
72-
/// the left side of the open square bracket, like `/[1/2/3]`.
71+
/// If you want to use your favorite character as a separator, you can use it by putting it
72+
/// on the left side of the open square bracket, like `/[1/2/3]`.
7373
///
7474
/// NOTE: A default value of empty string array option in a field attribute is `[]`, like
7575
/// `#[opt(cfg="=[]")]`, but it doesn't represent an array which contains only one empty
@@ -114,7 +114,7 @@ impl<'b> Cmd<'_> {
114114
opt_store.set_field_values(&self.opts)
115115
}
116116

117-
/// Parse command line arguments until the first command argument and set their option values
117+
/// Parses command line arguments until the first command argument and set their option values
118118
/// to the option store which is passed as an argument.
119119
///
120120
/// This method creates and returns a new [Cmd] instance that holds the command line arguments

src/parse/parse_with.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ impl<'b, 'a> Cmd<'a> {
2929
/// the value of `defaults` is set as the option arguments.
3030
///
3131
/// If options not declared in option configurations are given in command line arguments, this
32-
/// method basicaly returns [UnconfiguredOption] error.
33-
/// However, if you want to allow other ooptions, add an option configuration of which
32+
/// method basicaly returns [InvalidOption::UnconfiguredOption] error.
33+
/// However, if you want to allow other options, add an option configuration of which
3434
/// `store_key` or the first element of `names` is "*".
3535
///
3636
/// The ownership of the vector of option configurations which is passed as an argument of

0 commit comments

Comments
 (0)