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

Method get_problem_id_from_name

src/cache/mod.rs:119–127  ·  view source on GitHub ↗

Get problem from name

(&self, problem_name: &String)

Source from the content-addressed store, hash-verified

117
118 /// Get problem from name
119 pub fn get_problem_id_from_name(&self, problem_name: &String) -> Result<i32, Error> {
120 let p: Problem = problems
121 .filter(name.eq(problem_name))
122 .first(&mut self.conn()?)?;
123 if p.category != "algorithms" {
124 return Err(anyhow!("No support for database and shell questions yet").into());
125 }
126 Ok(p.fid)
127 }
128
129 /// Get daily problem
130 pub async fn get_daily_problem_id(&self) -> Result<i32, Error> {

Callers

nothing calls this directly

Calls 1

connMethod · 0.80

Tested by

no test coverage detected