Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c5ecc0c

Browse files
authored
Allow more flexible categories (clearloop#31)
* Update cfg.rs * Update cfg.rs * update help text
1 parent dc19d2a commit c5ecc0c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎src/cfg.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const DEFAULT_CONFIG: &str = r#"
1313
[sys]
1414
categories = [
1515
"algorithms",
16+
"concurrency",
1617
"database",
1718
"shell"
1819
]
@@ -99,7 +100,7 @@ pub struct Cookies {
99100
/// System settings, for leetcode api mainly
100101
#[derive(Clone, Debug, Deserialize, Serialize)]
101102
pub struct Sys {
102-
pub categories: [String;3],
103+
pub categories: Vec<String>,
103104
pub langs: [String; 16],
104105
pub urls: HashMap<String, String>,
105106
}

‎src/cmds/list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! OPTIONS:
1616
//! -c, --category <category> Fliter problems by category name
17-
//! [alogrithms, database, shell]
17+
//! [algorithms, database, shell, concurrency]
1818
//! -q, --query <query> Fliter questions by conditions:
1919
//! Uppercase means negative
2020
//! e = easy E = m+h
@@ -47,7 +47,7 @@ use clap::{App, Arg, ArgMatches, SubCommand};
4747
pub struct ListCommand;
4848

4949
static CATEGORY_HELP: &str = r#"Fliter problems by category name
50-
[alogrithms, database, shell]
50+
[algorithms, database, shell, concurrency]
5151
"#;
5252

5353
static QUERY_HELP: &str = r#"Fliter questions by conditions:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /