Skip to content

Commit

Permalink
feat(ing list): make ing type optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Thaumy committed Sep 13, 2023
1 parent ce5ea17 commit 35fd0d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/ing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl Ing {
pub enum IngType {
Follow = 1,
Myself = 4,
Pub = 5,
Public = 5,
//RecentComment = 6,
MyComment = 7,
//Tag = 10,
Expand Down
2 changes: 1 addition & 1 deletion src/args/cmd/ing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ pub enum Cmd {
#[arg(long)]
#[arg(value_name = "TYPE")]
#[arg(default_value = "public")]
r#type: IngType,
r#type: Option<IngType>,
},
}
2 changes: 1 addition & 1 deletion src/args/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub fn list_ing(args: &Args) -> Option<(usize, usize, IngType)> {
} => {
let skip = get_skip(skip);
let take = get_take(take);
(skip, take, r#type.clone())
(skip, take, r#type.clone().unwrap_or(IngType::Public))
}
_ => return None,
}
Expand Down

0 comments on commit 35fd0d4

Please sign in to comment.