*: fix pedantry

This commit is contained in:
Cole Helbling 2020-06-17 19:02:39 -07:00
parent dc63498a27
commit f2c3dc3fa4
No known key found for this signature in database
GPG key ID: B37E0F2371016A4C
5 changed files with 6 additions and 6 deletions

View file

@ -168,7 +168,7 @@ impl Metric {
MetricType::Ticker(Metric { MetricType::Ticker(Metric {
variant: parts.iter().cloned().collect(), variant: parts.iter().cloned().collect(),
fields: fields fields: fields
.unwrap_or_else(|| vec![]) .unwrap_or_default()
.iter() .iter()
.map(|(fieldname, fieldtype)| ((*fieldname).to_string(), (*fieldtype).to_string())) .map(|(fieldname, fieldtype)| ((*fieldname).to_string(), (*fieldtype).to_string()))
.collect(), .collect(),
@ -183,7 +183,7 @@ impl Metric {
MetricType::Counter(Metric { MetricType::Counter(Metric {
variant: parts.iter().cloned().collect(), variant: parts.iter().cloned().collect(),
fields: fields fields: fields
.unwrap_or_else(|| vec![]) .unwrap_or_default()
.iter() .iter()
.map(|(fieldname, fieldtype)| ((*fieldname).to_string(), (*fieldtype).to_string())) .map(|(fieldname, fieldtype)| ((*fieldname).to_string(), (*fieldtype).to_string()))
.collect(), .collect(),

View file

@ -44,7 +44,7 @@ fn main() -> Result<(), Box<dyn Error>> {
})?; })?;
let queue_name = if cfg.runner.build_all_jobs != Some(true) { let queue_name = if cfg.runner.build_all_jobs != Some(true) {
let queue_name = format!("build-inputs-{}", cfg.nix.system.clone()); let queue_name = format!("build-inputs-{}", cfg.nix.system);
chan.declare_queue(easyamqp::QueueConfig { chan.declare_queue(easyamqp::QueueConfig {
queue: queue_name.clone(), queue: queue_name.clone(),
passive: false, passive: false,

View file

@ -39,7 +39,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let nix = cfg.nix(); let nix = cfg.nix();
let events = stats::RabbitMQ::from_lapin( let events = stats::RabbitMQ::from_lapin(
&format!("{}-{}", cfg.runner.identity.clone(), cfg.nix.system.clone()), &format!("{}-{}", cfg.runner.identity, cfg.nix.system),
task::block_on(conn.create_channel())?, task::block_on(conn.create_channel())?,
); );

View file

@ -19,7 +19,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let mut chan = task::block_on(conn.create_channel())?; let mut chan = task::block_on(conn.create_channel())?;
let events = stats::RabbitMQ::from_lapin( let events = stats::RabbitMQ::from_lapin(
&format!("{}-{}", cfg.runner.identity.clone(), cfg.nix.system.clone()), &format!("{}-{}", cfg.runner.identity, cfg.nix.system),
task::block_on(conn.create_channel())?, task::block_on(conn.create_channel())?,
); );

View file

@ -32,7 +32,7 @@ impl BuildJob {
statusreport: Option<ExchangeQueue>, statusreport: Option<ExchangeQueue>,
request_id: String, request_id: String,
) -> BuildJob { ) -> BuildJob {
let logbackrk = format!("{}.{}", repo.full_name.clone(), pr.number,).to_lowercase(); let logbackrk = format!("{}.{}", repo.full_name, pr.number).to_lowercase();
BuildJob { BuildJob {
repo, repo,