Skip to content

Commit 35fd0d4

Browse files
committed
feat(ing list): make ing type optional
1 parent ce5ea17 commit 35fd0d4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/api/ing/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl Ing {
2323
pub enum IngType {
2424
Follow = 1,
2525
Myself = 4,
26-
Pub = 5,
26+
Public = 5,
2727
//RecentComment = 6,
2828
MyComment = 7,
2929
//Tag = 10,

src/args/cmd/ing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ pub enum Cmd {
4242
#[arg(long)]
4343
#[arg(value_name = "TYPE")]
4444
#[arg(default_value = "public")]
45-
r#type: IngType,
45+
r#type: Option<IngType>,
4646
},
4747
}

src/args/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub fn list_ing(args: &Args) -> Option<(usize, usize, IngType)> {
141141
} => {
142142
let skip = get_skip(skip);
143143
let take = get_take(take);
144-
(skip, take, r#type.clone())
144+
(skip, take, r#type.clone().unwrap_or(IngType::Public))
145145
}
146146
_ => return None,
147147
}

0 commit comments

Comments
 (0)