File tree Expand file tree Collapse file tree 7 files changed +13
-0
lines changed Expand file tree Collapse file tree 7 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1
1
use clap:: Parser ;
2
2
3
3
#[ derive( Parser , Debug ) ]
4
+ #[ non_exhaustive]
4
5
pub struct Opt {
5
6
#[ arg( verbatim_doc_comment) ]
6
7
/// Show favorite list, order by time in DESC
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use crate::api::ing::IngType;
2
2
use clap:: { Parser , Subcommand } ;
3
3
4
4
#[ derive( Parser , Debug ) ]
5
+ #[ non_exhaustive]
5
6
pub struct Opt {
6
7
#[ command( subcommand) ]
7
8
pub cmd : Option < Cmd > ,
@@ -28,6 +29,7 @@ pub struct Opt {
28
29
}
29
30
30
31
#[ derive( Debug , Subcommand ) ]
32
+ #[ non_exhaustive]
31
33
pub enum Cmd {
32
34
#[ clap( verbatim_doc_comment) ]
33
35
/// Show ing list, order by time in DESC
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ pub mod user;
7
7
use clap:: Subcommand ;
8
8
9
9
#[ derive( Debug , Subcommand ) ]
10
+ #[ non_exhaustive]
10
11
pub enum Cmd {
11
12
/// User operations
12
13
#[ clap( visible_alias = "u" ) ]
Original file line number Diff line number Diff line change 1
1
use clap:: Parser ;
2
2
3
3
#[ derive( Parser , Debug ) ]
4
+ #[ non_exhaustive]
4
5
pub struct Opt {
5
6
#[ arg( verbatim_doc_comment) ]
6
7
/// Show news list, order by time in DESC
Original file line number Diff line number Diff line change 1
1
use clap:: { Parser , Subcommand } ;
2
2
3
3
#[ derive( Parser , Debug ) ]
4
+ #[ non_exhaustive]
4
5
pub struct Opt {
5
6
#[ clap( verbatim_doc_comment) ]
6
7
/// Show title and content of a specific post
@@ -51,6 +52,7 @@ pub struct Opt {
51
52
}
52
53
53
54
#[ derive( Parser , Debug ) ]
55
+ #[ non_exhaustive]
54
56
pub struct CreateCmd {
55
57
#[ arg( verbatim_doc_comment) ]
56
58
/// Set post title
@@ -76,6 +78,7 @@ pub struct CreateCmd {
76
78
}
77
79
78
80
#[ derive( Parser , Debug ) ]
81
+ #[ non_exhaustive]
79
82
pub struct UpdateCmd {
80
83
#[ arg( verbatim_doc_comment) ]
81
84
/// Set post title
@@ -102,6 +105,7 @@ pub struct UpdateCmd {
102
105
}
103
106
104
107
#[ derive( Parser , Debug ) ]
108
+ #[ non_exhaustive]
105
109
pub struct SearchCmd {
106
110
#[ arg( verbatim_doc_comment) ]
107
111
/// Search self post
@@ -121,6 +125,7 @@ pub struct SearchCmd {
121
125
}
122
126
123
127
#[ derive( Debug , Subcommand ) ]
128
+ #[ non_exhaustive]
124
129
pub enum Cmd {
125
130
#[ clap( verbatim_doc_comment) ]
126
131
/// Create post
Original file line number Diff line number Diff line change 1
1
use clap:: Parser ;
2
2
3
3
#[ derive( Parser , Debug ) ]
4
+ #[ non_exhaustive]
4
5
pub struct Opt {
5
6
#[ arg( verbatim_doc_comment) ]
6
7
/// Login with your personal access token (PAT)
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ pub enum TimeStyle {
18
18
}
19
19
20
20
#[ derive( Parser , Debug ) ]
21
+ #[ non_exhaustive]
21
22
pub struct GlobalOpt {
22
23
#[ arg( verbatim_doc_comment) ]
23
24
/// Execute with specific PAT
@@ -82,6 +83,7 @@ pub struct GlobalOpt {
82
83
83
84
#[ derive( Parser , Debug ) ]
84
85
#[ command( author, about, long_about = None , version) ]
86
+ #[ non_exhaustive]
85
87
pub struct Args {
86
88
#[ command( subcommand) ]
87
89
pub cmd : Option < Cmd > ,
You can’t perform that action at this time.
0 commit comments