Skip to content

Commit

Permalink
chore: Clippy strikes again (#7438)
Browse files Browse the repository at this point in the history
### Description
Clippy be clippin


Closes TURBO-2399
  • Loading branch information
Zertsov committed Feb 20, 2024
1 parent 3b3eda3 commit 306f130
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/turbopack-ecmascript/src/tree_shake/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ fn print<N: swc_core::ecma::codegen::Node>(cm: &Arc<SourceMap>, nodes: &[&N]) ->
fn render_graph(item_ids: &[ItemId], g: &mut DepGraph) -> String {
let mut mermaid = String::from("graph TD\n");

for (_, id) in item_ids.iter().enumerate() {
for id in item_ids.iter() {
let i = g.g.node(id);

writeln!(mermaid, " Item{};", i + 1).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/turbopack/tests/node-file-trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ impl std::str::FromStr for CaseInput {
async fn print_graph(asset: Vc<Box<dyn OutputAsset>>) -> Result<()> {
let mut visited = HashSet::new();
let mut queue = Vec::new();
queue.push((0, asset.clone()));
queue.push((0, asset));
while let Some((depth, asset)) = queue.pop() {
let references = asset.references().await?;
let mut indent = String::new();
Expand Down
3 changes: 1 addition & 2 deletions crates/turborepo-paths/src/absolute_system_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ impl<'a> TryFrom<&'a Path> for &'a AbsoluteSystemPath {
#[cfg(test)]
mod tests {
use anyhow::Result;
use tempdir::TempDir;
use test_case::test_case;

use super::*;
Expand Down Expand Up @@ -606,7 +605,7 @@ mod tests {
mode: Option<Permissions>,
expected: Permissions,
) -> Result<()> {
let test_dir = TempDir::new("mkdir-all")?;
let test_dir = tempdir::TempDir::new("mkdir-all")?;

let test_path = test_dir.path().join("foo");

Expand Down
3 changes: 1 addition & 2 deletions crates/turborepo-wax/src/walk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,6 @@ mod tests {

use build_fs_tree::{dir, file, Build, FileSystemTree};
use path_slash::PathBufExt;
use regex::Regex;
use tempfile::{self, TempDir};

use crate::{
Expand Down Expand Up @@ -1312,7 +1311,7 @@ mod tests {
// it a valid glob, we must
#[cfg(windows)]
let slash_path = {
let regex = Regex::new("([A-Z]):").unwrap();
let regex = regex::Regex::new("([A-Z]):").unwrap();
regex.replace(&slash_path, "$1\\:")
};

Expand Down
2 changes: 1 addition & 1 deletion packages/turbo-repository/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl Workspace {
})
.map(|p| {
let package_path = workspace_root.resolve(&p.path);
Package::new(p.name.to_string(), &workspace_root, &package_path)
Package::new(p.name.to_string(), workspace_root, &package_path)
})
.collect();

Expand Down

0 comments on commit 306f130

Please sign in to comment.