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 609931c commit 06df7eaCopy full SHA for 06df7ea
src/cache/mod.rs
@@ -123,7 +123,7 @@ impl Cache {
123
}
124
125
/// Get problem from name
126
- 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> {
127
let p: Problem = problems
128
.filter(name.eq(problem_name))
129
.first(&self.conn()?)?;
@@ -132,7 +132,7 @@ impl Cache {
132
"Not support database and shell questions for now".to_string(),
133
));
134
135
- Ok(p)
+ Ok(p.fid)
136
137
138
/// Get daily problem
0 commit comments