Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed Sep 19, 2024
1 parent 0856614 commit d840ccb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions crates/turbo-trace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "turbo-trace"
version = "0.1.0"
edition = "2021"
license = "MIT"

[dependencies]
camino.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/turbo-trace/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![deny(clippy::all)]
mod import_finder;
mod tracer;

Expand Down
8 changes: 4 additions & 4 deletions crates/turbo-trace/src/tracer.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand All @@ -18,7 +18,7 @@ pub struct Tracer {
files: Vec<AbsoluteSystemPathBuf>,
seen: HashSet<AbsoluteSystemPathBuf>,
ts_config: Option<AbsoluteSystemPathBuf>,
source_map: Arc<SourceMap>,
source_map: Rc<SourceMap>,
}

#[derive(Debug, Error, Diagnostic)]
Expand Down Expand Up @@ -58,7 +58,7 @@ impl Tracer {
files,
seen,
ts_config,
source_map: Arc::new(SourceMap::default()),
source_map: Rc::new(SourceMap::default()),
})
}

Expand Down Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ impl Query {
}

async fn file(&self, path: String) -> Result<File, Error> {
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()));
Expand Down

0 comments on commit d840ccb

Please sign in to comment.