MCPcopy Index your code
hub / github.com/clearloop/leetcode-cli / resp_to_json

Method resp_to_json

src/cache/mod.rs:76–83  ·  view source on GitHub ↗
(&self, resp: Response)

Source from the content-addressed store, hash-verified

74 }
75
76 async fn resp_to_json<T: DeserializeOwned>(&self, resp: Response) -> Result<T, Error> {
77 let maybe_json: Result<T, _> = resp.json().await;
78 if maybe_json.is_err() && self.is_session_bad().await {
79 Err(Error::CookieError)
80 } else {
81 Ok(maybe_json?)
82 }
83 }
84
85 /// Download leetcode problems to db
86 pub async fn download_problems(self) -> Result<Vec<Problem>, Error> {

Callers 1

recur_verifyMethod · 0.80

Calls 1

is_session_badMethod · 0.80

Tested by

no test coverage detected