silence some clippy warnings

It looks like the current version of rustc/clippy seems the include expanded
macros (like tracing) in the complexity.  None of these warnings show up
with rust 1.42.0.
This commit is contained in:
Daiderd Jordan 2020-05-01 21:21:40 +02:00
parent cc89c1a88d
commit 52e2105df7
No known key found for this signature in database
GPG key ID: D02435D05B810C96
5 changed files with 10 additions and 0 deletions

View file

@ -149,6 +149,8 @@ impl SpawnedAsyncCmd {
} }
} }
// FIXME: remove with rust/cargo update
#[allow(clippy::cognitive_complexity)]
fn block_on_waiters( fn block_on_waiters(
monitor_rx: mpsc::Receiver<(WaitTarget, WaitResult<()>)>, monitor_rx: mpsc::Receiver<(WaitTarget, WaitResult<()>)>,
mut waiters: HashMap<WaitTarget, thread::JoinHandle<()>>, mut waiters: HashMap<WaitTarget, thread::JoinHandle<()>>,

View file

@ -9,6 +9,8 @@ use ofborg::easyamqp::{self, ChannelExt, ConsumerExt};
use ofborg::easylapin; use ofborg::easylapin;
use ofborg::{checkout, config, tasks}; use ofborg::{checkout, config, tasks};
// FIXME: remove with rust/cargo update
#[allow(clippy::cognitive_complexity)]
fn main() -> Result<(), Box<dyn Error>> { fn main() -> Result<(), Box<dyn Error>> {
ofborg::setup_log(); ofborg::setup_log();

View file

@ -12,6 +12,8 @@ use std::process;
use amqp::Basic; use amqp::Basic;
use tracing::{error, info}; use tracing::{error, info};
// FIXME: remove with rust/cargo update
#[allow(clippy::cognitive_complexity)]
fn main() { fn main() {
let memory_info = sys_info::mem_info().expect("Unable to get memory information from OS"); let memory_info = sys_info::mem_info().expect("Unable to get memory information from OS");

View file

@ -271,6 +271,8 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker {
} }
} }
// FIXME: remove with rust/cargo update
#[allow(clippy::cognitive_complexity)]
fn consumer( fn consumer(
&self, &self,
job: &buildjob::BuildJob, job: &buildjob::BuildJob,

View file

@ -246,6 +246,8 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
} }
} }
// FIXME: remove with rust/cargo update
#[allow(clippy::cognitive_complexity)]
fn evaluate_job(&mut self) -> Result<worker::Actions, EvalWorkerError> { fn evaluate_job(&mut self) -> Result<worker::Actions, EvalWorkerError> {
let job = self.job; let job = self.job;
let repo = self let repo = self