Skip to content

Commit

Permalink
Fix test and clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Soltis committed Sep 1, 2023
1 parent 836230b commit 9431808
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions crates/turborepo-paths/src/absolute_system_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl AbsoluteSystemPath {
Ok(Self::new_unchecked(path))
}

pub(crate) fn new_unchecked<'a>(path: &'a Utf8Path) -> &'a Self {
pub(crate) fn new_unchecked(path: &Utf8Path) -> &Self {
unsafe { &*(path as *const Utf8Path as *const Self) }
}

Expand Down Expand Up @@ -591,13 +591,10 @@ mod tests {
let abs_path = AbsoluteSystemPathBuf::try_from(root)
.unwrap()
.join_components(abs_path_components);
let other_path = other_components.iter().fold(
PathBuf::from_str(root).unwrap(),
|mut current, component| {
current.push(component);
current
},
);
let other_path = AbsoluteSystemPathBuf::try_from(root)
.unwrap()
.join_components(other_components);

let relation = abs_path.relation_to_path(&other_path);
assert_eq!(relation, expected);
}
Expand Down

0 comments on commit 9431808

Please sign in to comment.