`exec` handler
(&self)
| 18 | impl 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 | } |
nothing calls this directly
no test coverage detected