From 34a77eb436f104b77e9ab3d9396b4f452b8cca34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Cluseau?= Date: Fri, 5 Jun 2026 11:04:17 +0200 Subject: [PATCH] chore --- src/apply.rs | 8 ++------ src/lib.rs | 4 ++-- src/rc.rs | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/apply.rs b/src/apply.rs index 3fa42d1..53b629a 100644 --- a/src/apply.rs +++ b/src/apply.rs @@ -25,7 +25,7 @@ pub async fn file(file: &File, root: &str, dry_run: bool) -> Result<()> { let kind = file.kind(); let content = kind.content()?; - use crate::{FileKind as K}; + use crate::FileKind as K; match kind.as_ref() { K::Skip => { info!("{}: kind is skip", file.path); @@ -34,11 +34,7 @@ pub async fn file(file: &File, root: &str, dry_run: bool) -> Result<()> { K::Content(_) | K::Content64(_) | K::Parts(_) => { let content = content.expect("this file kind should have content"); if dry_run { - info!( - "would create {} ({} bytes)", - file.path, - content.len() - ); + info!("would create {} ({} bytes)", file.path, content.len()); } else { fs::write(path, &content).await?; } diff --git a/src/lib.rs b/src/lib.rs index 867896d..b1a6838 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,12 +111,12 @@ impl Config { } pub fn base64_decode(s: &str) -> Result, base64::DecodeError> { - use base64::{prelude::BASE64_STANDARD_NO_PAD as B64, Engine as _}; + use base64::{Engine as _, prelude::BASE64_STANDARD_NO_PAD as B64}; B64.decode(s.trim_end_matches('=')) } pub fn base64_encode(b: &[u8]) -> String { - use base64::{prelude::BASE64_STANDARD as B64, Engine as _}; + use base64::{Engine as _, prelude::BASE64_STANDARD as B64}; B64.encode(b) } diff --git a/src/rc.rs b/src/rc.rs index 2aabf6c..828f5ab 100644 --- a/src/rc.rs +++ b/src/rc.rs @@ -117,7 +117,7 @@ where std::process::exit(0); } Err(e) => { - eprint!("{e}"); + eprintln!("{e}"); std::process::exit(1); } }