Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/cache/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl Question {
}

pub fn desc_comment(&self, conf: &Config) -> String {
let desc = self.t_content.render();
let desc = self.content.render();

let mut res = desc.lines().fold("\n".to_string(), |acc, e| {
acc + "" + conf.code.comment_leading.as_str() + " " + e + "\n"
Expand Down
2 changes: 1 addition & 1 deletion src/cache/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub fn tags(v: Value) -> Option<Vec<String>> {
pub fn daily(v: Value) -> Option<i32> {
trace!("Parse daily...");
let v_obj = v.as_object()?.get("data")?.as_object()?;
match v_obj.get("dailyQuestionRecord") {
match v_obj.get("activeDailyCodingChallengeQuestion") {
// Handle on leetcode-com
Some(v) => v,
// Handle on leetcode-cn
Expand Down
7 changes: 6 additions & 1 deletion src/cmds/pick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ impl Command for PickCommand {
crate::helper::filter(&mut problems, query.to_string());
}

let daily_id = if m.contains_id("daily") {
let daily = match m.get_one::<bool>("daily") {
Some(x) => x,
None => &false,
};

let daily_id = if *daily {
Some(cache.get_daily_problem_id().await?)
} else {
None
Expand Down
Loading