mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 15:20:51 +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"
|
ctrlc = "3"
|
||||||
fatfs = { version = "0.3", optional = true }
|
fatfs = { version = "0.3", optional = true }
|
||||||
|
|
||||||
#Logging
|
# Logging
|
||||||
log = "0.4.34"
|
log = "0.4.34"
|
||||||
env_logger = "0.11.11"
|
env_logger = "0.11.11"
|
||||||
owo-colors = "4"
|
owo-colors = "4"
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ pub fn add(args: &[String]) -> i32 {
|
|||||||
|
|
||||||
let key = format!("dependencies.{}", add_args.name);
|
let key = format!("dependencies.{}", add_args.name);
|
||||||
if let Err(err) = config.edit(&key, dep_value) {
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,11 +89,11 @@ pub fn fmt(args: &[String]) -> i32 {
|
|||||||
0
|
0
|
||||||
}
|
}
|
||||||
Ok(s) => {
|
Ok(s) => {
|
||||||
error!("clang-format failed with status: {}", s);
|
error!("clang-format failed with status: {s}");
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Failed to execute clang-format: {}", e);
|
error!("Failed to execute clang-format: {e}");
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
pub use log::{error, warn};
|
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,
|
_ if target.contains('-') => target,
|
||||||
_ => {
|
_ => {
|
||||||
warn!(
|
warn!(
|
||||||
"Unknown target '{}', using as-is. Supported short names: linux, macos, windows",
|
"Unknown target '{target}', using as-is. Supported short names: linux, macos, windows"
|
||||||
target
|
|
||||||
);
|
);
|
||||||
target
|
target
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ use log::{Level, LevelFilter};
|
|||||||
use owo_colors::OwoColorize;
|
use owo_colors::OwoColorize;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
// Функция инициализирующая логирование
|
// A function for initializing the logging lib with basic settings.
|
||||||
pub fn init() {
|
pub fn init() {
|
||||||
Builder::new()
|
Builder::new()
|
||||||
.filter_level(LevelFilter::Warn)
|
.filter_level(LevelFilter::Warn)
|
||||||
|
|||||||
Reference in New Issue
Block a user