We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0d889a commit 8a06a59Copy full SHA for 8a06a59
src/problem.rs
@@ -1,8 +1,8 @@
1
extern crate reqwest;
2
extern crate serde_json;
3
4
-use std::fmt::{Display, Error, Formatter};
5
use serde_json::Value;
+use std::fmt::{Display, Error, Formatter};
6
7
const PROBLEMS_URL: &str = "https://leetcode.com/api/problems/algorithms/";
8
const GRAPHQL_URL: &str = "https://leetcode.com/graphql";
@@ -46,7 +46,7 @@ pub fn get_problem(frontend_question_id: u32) -> Option<Problem> {
46
question_id: problem.stat.frontend_question_id,
47
return_type: {
48
let v: Value = serde_json::from_str(&resp.data.question.meta_data).unwrap();
49
- v["return"]["type"].to_string().as_str().replace("\"", "").to_string()
+ v["return"]["type"].to_string().replace("\"", "")
50
},
51
});
52
}
0 commit comments