mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Avoid an early return in try_execute_query.
When there are two cases of equal size and importance, I find an if/else expression easier to read than an early return.
This commit is contained in:
@@ -331,15 +331,15 @@ fn try_execute_query<'tcx, C: QueryCache, const INCR: bool>(
|
||||
|
||||
// Only call `wait_for_query` if we're using a Rayon thread pool
|
||||
// as it will attempt to mark the worker thread as blocked.
|
||||
return wait_for_query(query, tcx, span, key, latch, current_job_id);
|
||||
wait_for_query(query, tcx, span, key, latch, current_job_id)
|
||||
} else {
|
||||
let id = job.id;
|
||||
drop(state_lock);
|
||||
|
||||
// If we are single-threaded we know that we have cycle error,
|
||||
// so we just return the error.
|
||||
cycle_error(query, tcx, id, span)
|
||||
}
|
||||
|
||||
let id = job.id;
|
||||
drop(state_lock);
|
||||
|
||||
// If we are single-threaded we know that we have cycle error,
|
||||
// so we just return the error.
|
||||
cycle_error(query, tcx, id, span)
|
||||
}
|
||||
ActiveKeyStatus::Poisoned => FatalError.raise(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user