You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnErr("Failed to fetch submission id from leetcode! Check your submissions manually on leetcode");
40
-
};
37
+
let data = client.post(&url).json(&submission).send()?.json::<SubmissionID>().wrap_err("Failed to fetch submission id from LeetCode, Check your submissions manually on leetcode")?;
38
+
41
39
println!("Evaluating solution...");
42
40
let submission_id = data.submission_id;
43
41
letmut last_state = PendingState::Unknown;
44
42
45
43
loop{
46
44
let url = format!("https://leetcode.com/submissions/detail/{submission_id}/check/");
47
-
letOk(data) = client.get(&url).send()else{
48
-
returnErr("Failed to parse arguments!");
49
-
};
45
+
let data = client
46
+
.get(&url)
47
+
.send()?
48
+
.json::<SubmissionResult>()
49
+
.wrap_err(
50
+
"Failed to fetch from leetcode! Try again after sometime or renew cookie",
0 commit comments