chore: fix clippy check failure (#1569)

This commit is contained in:
Taiki Endo
2019-09-18 10:19:44 -07:00
committed by Carl Lerche
parent ab785bfba7
commit e2161502ad
3 changed files with 3 additions and 2 deletions
@@ -395,6 +395,7 @@ impl Pool {
/// If there are any other workers currently relaxing, signal them that work
/// is available so that they can try to find more work to process.
#[allow(clippy::cognitive_complexity)] // https://github.com/rust-lang/rust-clippy/issues/3900
pub(crate) fn signal_work(&self, pool: &Arc<Pool>) {
debug_assert_eq!(*self, **pool);
+1 -1
View File
@@ -96,7 +96,7 @@ impl Task {
/// scheduled again.
///
// tracing macro expansion adds enough branches to make clippy angry here.
#[allow(clippy::cognitive_complexity)]
#[allow(clippy::cognitive_complexity)] // https://github.com/rust-lang/rust-clippy/issues/3900
pub(crate) fn run(me: &Arc<Task>, pool: &Arc<Pool>) -> Run {
use self::State::*;
#[cfg(feature = "tracing")]
+1 -1
View File
@@ -564,7 +564,7 @@ impl Worker {
///
/// Returns `true` if woken up due to new work arriving.
// tracing macro expansion adds enough branches to make clippy angry here.
#[cfg_attr(feature = "tracing", allow(clippy::cognitive_complexity))]
#[allow(clippy::cognitive_complexity)] // https://github.com/rust-lang/rust-clippy/issues/3900
fn sleep(&self) -> bool {
use self::Lifecycle::*;