diff --git a/crates/turbo-trace/Cargo.toml b/crates/turbo-trace/Cargo.toml index 35da4a389f09a..5eeb45bfc5c34 100644 --- a/crates/turbo-trace/Cargo.toml +++ b/crates/turbo-trace/Cargo.toml @@ -2,6 +2,7 @@ name = "turbo-trace" version = "0.1.0" edition = "2021" +license = "MIT" [dependencies] camino.workspace = true diff --git a/crates/turbo-trace/src/lib.rs b/crates/turbo-trace/src/lib.rs index 251a3e7d56791..b8f162159e1ba 100644 --- a/crates/turbo-trace/src/lib.rs +++ b/crates/turbo-trace/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(clippy::all)] mod import_finder; mod tracer; diff --git a/crates/turbo-trace/src/tracer.rs b/crates/turbo-trace/src/tracer.rs index c7c302b6159ee..2d236fc9ef482 100644 --- a/crates/turbo-trace/src/tracer.rs +++ b/crates/turbo-trace/src/tracer.rs @@ -1,4 +1,4 @@ -use std::{collections::HashSet, fs, sync::Arc}; +use std::{collections::HashSet, fs, rc::Rc}; use camino::Utf8PathBuf; use miette::{Diagnostic, NamedSource, SourceSpan}; @@ -18,7 +18,7 @@ pub struct Tracer { files: Vec, seen: HashSet, ts_config: Option, - source_map: Arc, + source_map: Rc, } #[derive(Debug, Error, Diagnostic)] @@ -58,7 +58,7 @@ impl Tracer { files, seen, ts_config, - source_map: Arc::new(SourceMap::default()), + source_map: Rc::new(SourceMap::default()), }) } @@ -142,7 +142,7 @@ impl Tracer { errors.push(TraceError::RootFile(file_path.to_owned())); continue; }; - match resolver.resolve(&file_dir, &import) { + match resolver.resolve(file_dir, import) { Ok(resolved) => match resolved.into_path_buf().try_into() { Ok(path) => self.files.push(path), Err(err) => { diff --git a/crates/turborepo-lib/src/query/mod.rs b/crates/turborepo-lib/src/query/mod.rs index a806a3bd1bf41..d26594ff2017e 100644 --- a/crates/turborepo-lib/src/query/mod.rs +++ b/crates/turborepo-lib/src/query/mod.rs @@ -301,7 +301,7 @@ impl Query { } async fn file(&self, path: String) -> Result { - let abs_path = AbsoluteSystemPathBuf::from_unknown(&self.run.repo_root(), path); + let abs_path = AbsoluteSystemPathBuf::from_unknown(self.run.repo_root(), path); if !abs_path.exists() { return Err(Error::FileNotFound(abs_path.to_string()));