Skip to content

Commit

Permalink
fix: style and unused dep
Browse files Browse the repository at this point in the history
  • Loading branch information
saying121 committed Nov 19, 2024
1 parent 3509cf4 commit 7c601e9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

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

2 changes: 0 additions & 2 deletions crates/leetcode-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ serde_json = { workspace = true }
ratatui = { workspace = true, optional = true }
regex = { workspace = true }

strum = { workspace = true }

# render
html2text = { workspace = true }
scraper = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/leetcode-api/src/leetcode/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async fn get_cookie(host: &str) -> Result<LeetCodeCookies> {
}
chromiums!(Chrome, Edge, Chromium, Brave, Yandex, Vivaldi, Opera,);
#[cfg(not(target_os = "linux"))]
chromiums!(OperaGx, CocCoc,);
chromiums!(OperaGX, CocCoc,);

bail!("failed")
}
5 changes: 1 addition & 4 deletions crates/leetcode-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ pub static LEETCODE: OnceCell<LeetCode> = OnceCell::const_new();
/// global leetocde
pub async fn glob_leetcode() -> &'static LeetCode {
LEETCODE
.get_or_init(|| async {
LeetCode::build()
.await
})
.get_or_init(|| async { LeetCode::build().await })
.await
}

0 comments on commit 7c601e9

Please sign in to comment.