From 68d0036a2c149d85d566fa4a92e8a9708f112197 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Tue, 16 Aug 2022 20:15:43 -0600 Subject: [PATCH] Thanks clippy --- src/command/apply.rs | 2 +- src/job.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/command/apply.rs b/src/command/apply.rs index c9c0595..f11dfb2 100644 --- a/src/command/apply.rs +++ b/src/command/apply.rs @@ -147,7 +147,7 @@ pub async fn run(_global_args: &ArgMatches, local_args: &ArgMatches) -> Result<( let filter = local_args.value_of("on").map(NodeFilter::new).transpose()?; - if !filter.is_some() && goal != Goal::Build { + if filter.is_none() && goal != Goal::Build { // User did not specify node, we should check meta and see rules let meta = hive.get_meta_config().await?; if !meta.allow_apply_all { diff --git a/src/job.rs b/src/job.rs index ac5f483..168e241 100644 --- a/src/job.rs +++ b/src/job.rs @@ -4,7 +4,7 @@ //! which coordinates the display of progress onto the terminal. use std::collections::HashMap; -use std::fmt::{self, Display}; +use std::fmt::{self, Display, Write}; use std::future::Future; use std::sync::Arc; use std::time::Duration; @@ -879,7 +879,7 @@ fn describe_node_list(nodes: &[NodeName]) -> Option { let remaining = rough_limit - s.len(); if next.len() + other_text.len() >= remaining { - s += &format!(", and {} other nodes", total - idx); + write!(s, ", and {} other nodes", total - idx).unwrap(); break; } }