diff --git a/Cargo.lock b/Cargo.lock index c3e5cc1..15bde1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1327,7 +1327,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "leetcode-cli" -version = "0.4.3" +version = "0.4.4" dependencies = [ "anyhow", "async-trait", diff --git a/src/cache/models.rs b/src/cache/models.rs index 30a7691..2f49eaf 100644 --- a/src/cache/models.rs +++ b/src/cache/models.rs @@ -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" diff --git a/src/cache/parser.rs b/src/cache/parser.rs index 0474c1f..329455d 100644 --- a/src/cache/parser.rs +++ b/src/cache/parser.rs @@ -98,7 +98,7 @@ pub fn tags(v: Value) -> Option> { pub fn daily(v: Value) -> Option { 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 diff --git a/src/cmds/pick.rs b/src/cmds/pick.rs index 3597d5d..ca36826 100644 --- a/src/cmds/pick.rs +++ b/src/cmds/pick.rs @@ -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::("daily") { + Some(x) => x, + None => &false, + }; + + let daily_id = if *daily { Some(cache.get_daily_problem_id().await?) } else { None pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy