Skip to content

Commit

Permalink
Update hash_watcher.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
gsoltis committed Apr 23, 2024
1 parent dcb6217 commit 9f51e71
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions crates/turborepo-filewatch/src/hash_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,12 @@ impl FileHashes {
// sibling file or directory that starts with the same prefix,
// e,g an update to apps/foo_decoy when the package path is
// apps/foo.
if let Some(package_path_to_file) = file_path.strip_prefix(package_path) {
// Pass along the path to the package, the path _within_ the package to this
// change, in unix format, and the set of input specs that
// we're tracking.
subtrie
.value()
.map(|specs| (package_path, package_path_to_file.to_unix(), specs))
} else {
None
}
let package_path_to_file = file_path.strip_prefix(package_path)?;
// Pass along the path to the package, the path _within_ the package to this
// change, in unix format, and the set of input specs that
// we're tracking.
let specs = subtrie.value()?;
Some((package_path, package_path_to_file.to_unix(), specs))
})
// now that we have a path and a set of specs, filter the specs to the relevant ones
.map(|(package_path, change_in_package, maybe_glob_sets)| {
Expand Down

0 comments on commit 9f51e71

Please sign in to comment.