@@ -8,16 +8,16 @@ use clap::{Parser, Subcommand};
8
8
#[ derive( Parser , Debug ) ]
9
9
#[ clap( version, about, long_about = None ) ]
10
10
pub struct Args {
11
- /// Specifies how the program will read the git history.
11
+ /// Specifies how the program will read the Git history.
12
12
#[ clap( subcommand) ]
13
13
input_method : InputMethod ,
14
14
15
- /// Always show the entire output.
15
+ /// Always shows the entire output.
16
16
#[ clap( short = 'v' , long = "verbose" ) ]
17
17
is_verbose : bool ,
18
18
19
- /// Filter the LOC diff for a certain file extension (e.g. `--file-extension
20
- /// cpp`). ORs if specified multiple times.
19
+ /// Filters the LOC diff for a certain file extension (e.g.
20
+ /// `--file-extension cpp`). ORs if specified multiple times.
21
21
#[ clap( short, long) ]
22
22
file_extension : Vec < String > ,
23
23
@@ -29,39 +29,39 @@ pub struct Args {
29
29
#[ clap( short, long) ]
30
30
output : Option < PathBuf > ,
31
31
32
- /// Filter for certain author names. ORs if specified multiple times.
32
+ /// Filters for certain author names. ORs if specified multiple times.
33
33
#[ clap( short, long) ]
34
34
author_contains : Vec < String > ,
35
35
36
- /// Filter for certain author names. ORs if specified multiple times.
36
+ /// Filters for certain author names. ORs if specified multiple times.
37
37
#[ clap( long) ]
38
38
author_equals : Vec < String > ,
39
39
40
- /// Filter for certain author emails. ORs if specified multiple times.
40
+ /// Filters for certain author emails. ORs if specified multiple times.
41
41
#[ clap( short, long) ]
42
42
email_contains : Vec < String > ,
43
43
44
- /// Filter for certain author emails. ORs if specified multiple times.
44
+ /// Filters for certain author emails. ORs if specified multiple times.
45
45
#[ clap( long) ]
46
46
email_equals : Vec < String > ,
47
47
48
- /// Filter for certain commit hashes. ORs if specified multiple times.
48
+ /// Filters for certain commit hashes. ORs if specified multiple times.
49
49
#[ clap( short, long) ]
50
50
commit_contains : Vec < String > ,
51
51
52
- /// Filter for certain commit hashes. ORs if specified multiple times.
52
+ /// Filters for certain commit hashes. ORs if specified multiple times.
53
53
#[ clap( long) ]
54
54
commit_equals : Vec < String > ,
55
55
56
- /// Filter for certain commit messages. ORs if specified multiple times.
56
+ /// Filters for certain commit messages. ORs if specified multiple times.
57
57
#[ clap( short, long) ]
58
58
message_contains : Vec < String > ,
59
59
60
- /// Filter for certain commit messages. ORs if specified multiple times.
60
+ /// Filters for certain commit messages. ORs if specified multiple times.
61
61
#[ clap( long) ]
62
62
message_equals : Vec < String > ,
63
63
64
- /// Filter for certain commit messages. ORs if specified multiple times.
64
+ /// Filters for certain commit messages. ORs if specified multiple times.
65
65
#[ clap( short = 'l' , long) ]
66
66
message_starts_with : Vec < String > ,
67
67
}
@@ -117,21 +117,21 @@ impl Args {
117
117
/// The possible input methods.
118
118
#[ derive( Subcommand , Debug ) ]
119
119
pub enum InputMethod {
120
- /// Read the input from the local Git history.
120
+ /// Reads the input from the local Git history.
121
121
GitHistory ,
122
122
123
- /// Read the specified input file.
123
+ /// Reads the specified input file.
124
124
LogFile {
125
125
/// The log file to read from.
126
126
log_file : PathBuf ,
127
127
} ,
128
128
129
- /// Read from `stdin`.
129
+ /// Reads from `stdin`.
130
130
Stdin ,
131
131
}
132
132
133
133
impl InputMethod {
134
- /// Process the configured input method.
134
+ /// Processes the configured input method.
135
135
pub fn read ( & self ) -> Result < String , Box < dyn std:: error:: Error > > {
136
136
match self {
137
137
Self :: GitHistory => {
@@ -293,7 +293,7 @@ impl Author {
293
293
& self . name
294
294
}
295
295
296
- /// Extract the author information from the given line.
296
+ /// Extracts the author information from the given line.
297
297
pub fn parse ( author : & str ) -> Result < Self , AuthorParseError > {
298
298
let ( name, remainder) = author. split_once ( '<' ) . ok_or ( AuthorParseError :: NameFailed ) ?;
299
299
@@ -374,7 +374,7 @@ impl Commit {
374
374
& self . message
375
375
}
376
376
377
- /// Construct a new instance from the raw input data.
377
+ /// Constructs a new instance from the raw input data.
378
378
pub fn parse ( commit : & str ) -> Result < ( Self , & str ) , CommitParseError > {
379
379
let ( commit, remainder) = commit
380
380
. strip_prefix ( "commit" )
0 commit comments