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

Method run

src/cmd/exec.rs:20–37  ·  view source on GitHub ↗

`exec` handler

(&self)

Source from the content-addressed store, hash-verified

18impl ExecArgs {
19 /// `exec` handler
20 pub async fn run(&self) -> Result<()> {
21 use crate::cache::{Cache, Run};
22
23 let cache = Cache::new()?;
24
25 let daily_id = if self.daily {
26 Some(cache.get_daily_problem_id().await?)
27 } else {
28 None
29 };
30
31 let id = self.id.or(daily_id).ok_or(Error::NoneError)?;
32
33 let res = cache.exec_problem(id, Run::Submit, None).await?;
34
35 println!("{}", res);
36 Ok(())
37 }
38}

Callers

nothing calls this directly

Calls 2

get_daily_problem_idMethod · 0.80
exec_problemMethod · 0.80

Tested by

no test coverage detected