From 10123ddedb01f6d923e82d6a96b22367cbb11ad1 Mon Sep 17 00:00:00 2001 From: alex-xr555 Date: Tue, 15 Sep 2026 18:32:12 +0300 Subject: [PATCH] Translation of comments into English, minor changes for completeness. --- Cargo.toml | 2 +- src/cli/add.rs | 2 +- src/cli/fmt.rs | 4 ++-- src/prelude.rs | 1 - src/utils/build.rs | 3 +-- src/utils/log.rs | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 920c370..a529b9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,7 +75,7 @@ serde_json = "1" ctrlc = "3" fatfs = { version = "0.3", optional = true } -#Logging +# Logging log = "0.4.34" env_logger = "0.11.11" owo-colors = "4" diff --git a/src/cli/add.rs b/src/cli/add.rs index e2b0a40..7c791f8 100644 --- a/src/cli/add.rs +++ b/src/cli/add.rs @@ -161,7 +161,7 @@ pub fn add(args: &[String]) -> i32 { let key = format!("dependencies.{}", add_args.name); if let Err(err) = config.edit(&key, dep_value) { - error!("Failed to update dcr.toml: {}", err); + error!("Failed to update dcr.toml: {err}"); return 1; } diff --git a/src/cli/fmt.rs b/src/cli/fmt.rs index 0219dc6..f1eae26 100644 --- a/src/cli/fmt.rs +++ b/src/cli/fmt.rs @@ -89,11 +89,11 @@ pub fn fmt(args: &[String]) -> i32 { 0 } Ok(s) => { - error!("clang-format failed with status: {}", s); + error!("clang-format failed with status: {s}"); 1 } Err(e) => { - error!("Failed to execute clang-format: {}", e); + error!("Failed to execute clang-format: {e}"); 1 } } diff --git a/src/prelude.rs b/src/prelude.rs index a56e30e..a1f87fc 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -1,2 +1 @@ pub use log::{error, warn}; -// use owo_colors::OwoColorize; diff --git a/src/utils/build.rs b/src/utils/build.rs index df4714b..d50e7f9 100644 --- a/src/utils/build.rs +++ b/src/utils/build.rs @@ -253,8 +253,7 @@ pub fn normalize_target_os(target: &str) -> &str { _ if target.contains('-') => target, _ => { warn!( - "Unknown target '{}', using as-is. Supported short names: linux, macos, windows", - target + "Unknown target '{target}', using as-is. Supported short names: linux, macos, windows" ); target } diff --git a/src/utils/log.rs b/src/utils/log.rs index d649790..a029d37 100644 --- a/src/utils/log.rs +++ b/src/utils/log.rs @@ -20,7 +20,7 @@ use log::{Level, LevelFilter}; use owo_colors::OwoColorize; use std::io::Write; -// Функция инициализирующая логирование +// A function for initializing the logging lib with basic settings. pub fn init() { Builder::new() .filter_level(LevelFilter::Warn)