Translation of comments into English, minor changes for completeness.

This commit is contained in:
alex-xr555
2026-09-15 18:32:12 +03:00
parent 0a140c75d8
commit 10123ddedb
6 changed files with 6 additions and 8 deletions

View File

@@ -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"

View File

@@ -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;
}

View File

@@ -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
}
}

View File

@@ -1,2 +1 @@
pub use log::{error, warn};
// use owo_colors::OwoColorize;

View File

@@ -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
}

View File

@@ -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)