We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e9dfa8 commit 45079f2Copy full SHA for 45079f2
src/cache/mod.rs
@@ -120,7 +120,7 @@ impl Cache {
120
}
121
122
/// Get problem from name
123
- pub fn get_problem_from_name(&self, problem_name: &String) -> Result<Problem, Error> {
+ pub fn get_problem_id_from_name(&self, problem_name: &String) -> Result<i32, Error> {
124
let p: Problem = problems
125
.filter(name.eq(problem_name))
126
.first(&self.conn()?)?;
@@ -129,7 +129,7 @@ impl Cache {
129
"Not support database and shell questions for now".to_string(),
130
));
131
132
- Ok(p)
+ Ok(p.fid)
133
134
135
/// Get daily problem
0 commit comments