Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed May 28, 2024
1 parent cd1b488 commit a5031dc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/turborepo-lib/src/task_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ impl PackageInputsHashes {
let scm_telemetry = package_task_event.child();
// Try hashing with the daemon, if we have a connection. If we don't, or if we
// timeout or get an error, fallback to local hashing
#[cfg(feature = "daemon-file-hashing")]
let hash_object = {
let hash_object = if cfg!(feature = "daemon-file-hashing") {
let handle = tokio::runtime::Handle::current();
let mut daemon = daemon
.as_ref() // Option::ref
Expand Down Expand Up @@ -181,11 +180,10 @@ impl PackageInputsHashes {
}
}
})
} else {
None
};

#[cfg(not(feature = "daemon-file-hashing"))]
let hash_object = None;

let mut hash_object = match hash_object {
Some(hash_object) => hash_object,
None => {
Expand Down

0 comments on commit a5031dc

Please sign in to comment.