From 9a0ebbfd684f56cf49585c6b58108ba2344cc284 Mon Sep 17 00:00:00 2001 From: hrmny <8845940+ForsakenHarmony@users.noreply.github.com> Date: Mon, 18 Mar 2024 18:50:19 +0100 Subject: [PATCH] fix warnings --- crates/turborepo-lib/src/run/scope/filter.rs | 15 +++++++-------- crates/turborepo-lockfiles/src/lib.rs | 2 ++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/crates/turborepo-lib/src/run/scope/filter.rs b/crates/turborepo-lib/src/run/scope/filter.rs index c8f8cb434270e..962e53484a639 100644 --- a/crates/turborepo-lib/src/run/scope/filter.rs +++ b/crates/turborepo-lib/src/run/scope/filter.rs @@ -37,7 +37,7 @@ impl PackageInference { pub fn calculate( turbo_root: &AbsoluteSystemPath, pkg_inference_path: &AnchoredSystemPathBuf, - pkg_graph: &package_graph::PackageGraph, + pkg_graph: &PackageGraph, ) -> Self { debug!( "Using {} as a basis for selecting packages", @@ -78,16 +78,15 @@ impl PackageInference { }; if let Some(name) = &self.package_name { - name.clone_into(&mut selector.name_pattern); + selector.name_pattern.clone_from(name); } - if selector.parent_dir != turbopath::AnchoredSystemPathBuf::default() { + if selector.parent_dir != AnchoredSystemPathBuf::default() { let repo_relative_parent_dir = self.directory_root.join(&selector.parent_dir); - let clean_parent_dir = - path_clean::clean(std::path::Path::new(repo_relative_parent_dir.as_path())) - .into_os_string() - .into_string() - .expect("path was valid utf8 before cleaning"); + let clean_parent_dir = path_clean::clean(Path::new(repo_relative_parent_dir.as_path())) + .into_os_string() + .into_string() + .expect("path was valid utf8 before cleaning"); selector.parent_dir = AnchoredSystemPathBuf::try_from(clean_parent_dir.as_str()) .expect("path wasn't absolute before cleaning"); } else if self.package_name.is_none() { diff --git a/crates/turborepo-lockfiles/src/lib.rs b/crates/turborepo-lockfiles/src/lib.rs index ee7def154db0e..e62d0b35e32ff 100644 --- a/crates/turborepo-lockfiles/src/lib.rs +++ b/crates/turborepo-lockfiles/src/lib.rs @@ -1,5 +1,7 @@ #![feature(trait_upcasting)] #![deny(clippy::all)] +// the pest proc macro adds an empty doc comment. +#![allow(clippy::empty_docs)] mod berry; mod bun;