use shared namespace

This commit is contained in:
yggverse 2025-06-07 17:46:04 +03:00
parent 45473762cb
commit 58c2e6e108

View file

@ -1,8 +1,10 @@
use std::time::{SystemTime, UNIX_EPOCH};
pub fn error(e: &anyhow::Error) { pub fn error(e: &anyhow::Error) {
eprintln!( eprintln!(
"[{}] [error] {e}", "[{}] [error] {e}",
std::time::SystemTime::now() SystemTime::now()
.duration_since(std::time::UNIX_EPOCH) .duration_since(UNIX_EPOCH)
.unwrap() .unwrap()
.as_millis() .as_millis()
) )
@ -11,8 +13,8 @@ pub fn error(e: &anyhow::Error) {
pub fn info(message: String) { pub fn info(message: String) {
eprintln!( eprintln!(
"[{}] [info] {message}", "[{}] [info] {message}",
std::time::SystemTime::now() SystemTime::now()
.duration_since(std::time::UNIX_EPOCH) .duration_since(UNIX_EPOCH)
.unwrap() .unwrap()
.as_millis() .as_millis()
) )