Fix warnings
This commit is contained in:
parent
470449f36e
commit
6050415fce
2 changed files with 2 additions and 4 deletions
|
|
@ -11,7 +11,6 @@ use tracing::error;
|
|||
use crate::{
|
||||
config::WorkerServerConfig,
|
||||
shared::{BenchMethod, FinishedRun, Measurement, Run, Source, UnfinishedRun},
|
||||
somehow,
|
||||
};
|
||||
|
||||
use super::server::Server;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ struct Counts {
|
|||
todos_by_dir: HashMap<String, usize>,
|
||||
}
|
||||
|
||||
fn count(run: &RunInProgress, path: &Path) -> somehow::Result<Counts> {
|
||||
fn count(path: &Path) -> somehow::Result<Counts> {
|
||||
let todo_regex = RegexBuilder::new(r"[^a-z]todo[^a-z]")
|
||||
.case_insensitive(true)
|
||||
.build()
|
||||
|
|
@ -174,10 +174,9 @@ impl RunInProgress {
|
|||
&self,
|
||||
server: &Server,
|
||||
) -> somehow::Result<Option<Finished>> {
|
||||
let run = self.clone();
|
||||
let dir = server.download_repo(&self.run.hash).await?;
|
||||
let path = dir.path().to_path_buf();
|
||||
let counts = tokio::task::spawn_blocking(move || count(&run, &path)).await??;
|
||||
let counts = tokio::task::spawn_blocking(move || count(&path)).await??;
|
||||
Ok(Some(Finished {
|
||||
exit_code: 0,
|
||||
measurements: measurements(counts),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue