From ef7dc8ba07b03218d9fa5bad243c0129ac97aba4 Mon Sep 17 00:00:00 2001 From: hdbg Date: Mon, 8 Dec 2025 14:32:27 +0100 Subject: [PATCH] houskeeping: linter run --- src/controller.rs | 3 +-- src/controller/docker.rs | 10 +++++----- src/controller/docker/download.rs | 2 +- src/controller/reconciler.rs | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/controller.rs b/src/controller.rs index 3dcf2a1..ae97580 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -127,8 +127,7 @@ impl Controller { let project = Project::new(config)?; println!( - "\n{} {}\n", - "Created pgd.toml in", + "\nCreated pgd.toml in {}\n", project.path.display().to_string().bright_white().bold() ); diff --git a/src/controller/docker.rs b/src/controller/docker.rs index 59af0c0..f6e561c 100644 --- a/src/controller/docker.rs +++ b/src/controller/docker.rs @@ -1,5 +1,5 @@ use miette::{Diagnostic, miette}; -use std::{io::Write, str::FromStr}; +use std::str::FromStr; use thiserror::Error; use bollard::{ @@ -283,11 +283,11 @@ impl DockerController { ..Default::default() }); - let logs = self + + + self .daemon .logs(container_id, options) - .map(|k| k.into_diagnostic().wrap_err("Failed streaming logs")); - - logs + .map(|k| k.into_diagnostic().wrap_err("Failed streaming logs")) } } diff --git a/src/controller/docker/download.rs b/src/controller/docker/download.rs index a84bd9d..defac6c 100644 --- a/src/controller/docker/download.rs +++ b/src/controller/docker/download.rs @@ -8,7 +8,7 @@ use indicatif::{MultiProgress, ProgressBar, ProgressState, ProgressStyle}; fn new_download_pb(multi: &MultiProgress, layer_id: &str) -> ProgressBar { let pb = multi.add(ProgressBar::new(0)); pb.set_style( -ProgressStyle::with_template(&"{spinner:.green} [{elapsed_precise}] {msg} [{wide_bar:.cyan/blue}] {bytes}/{total_bytes} ({eta})".to_string()) +ProgressStyle::with_template("{spinner:.green} [{elapsed_precise}] {msg} [{wide_bar:.cyan/blue}] {bytes}/{total_bytes} ({eta})") .unwrap() .with_key("eta", |state: &ProgressState, w: &mut dyn Write| { write!(w, "{:.1}s", state.eta().as_secs_f64()).unwrap() diff --git a/src/controller/reconciler.rs b/src/controller/reconciler.rs index c67499f..6aff31e 100644 --- a/src/controller/reconciler.rs +++ b/src/controller/reconciler.rs @@ -146,7 +146,7 @@ impl<'a> Reconciler<'a> { .is_container_running_by_id(container_id) .await? { - return Ok(()); + Ok(()) } else { miette::bail!("Container stopped unexpectedly after start"); }