diff options
author | David Knaack <davidkna@users.noreply.github.com> | 2021-06-16 21:23:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 21:23:14 +0200 |
commit | bddf5bf1d14f12372915217b5934fff4500f670f (patch) | |
tree | d21bbe91686fae0643d80f8a4b7ff051849b08d2 | |
parent | e3421858cf3ff4d430bd00a8e208f173466e438f (diff) |
fix(clippy): fix new lint warning (#2803)
-rw-r--r-- | src/modules/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/mod.rs b/src/modules/mod.rs index 4e06309cf..674a0fc5b 100644 --- a/src/modules/mod.rs +++ b/src/modules/mod.rs @@ -146,16 +146,14 @@ pub fn handle<'a>(module: &str, context: &'a Context) -> Option<Module<'a>> { let elapsed = start.elapsed(); log::trace!("Took {:?} to compute module {:?}", elapsed, module); - if elapsed.as_millis() < 1 { + if elapsed.as_millis() >= 1 { // If we take less than 1ms to compute a None, then we will not return a module at all // if we have a module: default duration is 0 so no need to change it - m - } else { // if we took more than 1ms we want to report that and so--in case we have None currently-- // need to create an empty module just to hold the duration for that case m.get_or_insert_with(|| context.new_module(module)).duration = elapsed; - m } + m } pub fn description(module: &str) -> &'static str { |