Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ForsakenHarmony committed Apr 8, 2024
1 parent a732951 commit 9a0ebbf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 7 additions & 8 deletions crates/turborepo-lib/src/run/scope/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 2 additions & 0 deletions crates/turborepo-lockfiles/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 9a0ebbf

Please sign in to comment.