Thanks clippy

This commit is contained in:
Zhaofeng Li 2022-08-16 20:15:43 -06:00
parent 34bb2e4674
commit 68d0036a2c
2 changed files with 3 additions and 3 deletions

View file

@ -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()?; 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 // User did not specify node, we should check meta and see rules
let meta = hive.get_meta_config().await?; let meta = hive.get_meta_config().await?;
if !meta.allow_apply_all { if !meta.allow_apply_all {

View file

@ -4,7 +4,7 @@
//! which coordinates the display of progress onto the terminal. //! which coordinates the display of progress onto the terminal.
use std::collections::HashMap; use std::collections::HashMap;
use std::fmt::{self, Display}; use std::fmt::{self, Display, Write};
use std::future::Future; use std::future::Future;
use std::sync::Arc; use std::sync::Arc;
use std::time::Duration; use std::time::Duration;
@ -879,7 +879,7 @@ fn describe_node_list(nodes: &[NodeName]) -> Option<String> {
let remaining = rough_limit - s.len(); let remaining = rough_limit - s.len();
if next.len() + other_text.len() >= remaining { if next.len() + other_text.len() >= remaining {
s += &format!(", and {} other nodes", total - idx); write!(s, ", and {} other nodes", total - idx).unwrap();
break; break;
} }
} }