mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 08:38:31 +00:00
Translation of comments into English, minor changes for completeness.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
pub use log::{error, warn};
|
||||
// use owo_colors::OwoColorize;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user