1
0
Fork 0

Modularize + Refactoring code

This commit is contained in:
Florian RICHER 2020-12-04 21:44:51 +01:00
parent 813280350f
commit 00ab67b212
23 changed files with 2001 additions and 87 deletions

5
engine_utils/Cargo.lock generated Normal file
View file

@ -0,0 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "engine_utils"
version = "0.0.1"

9
engine_utils/Cargo.toml Normal file
View file

@ -0,0 +1,9 @@
[package]
name = "engine_utils"
version = "0.0.1"
authors = ["Florian RICHER <florian.richer@unova.fr>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

41
engine_utils/src/lib.rs Normal file
View file

@ -0,0 +1,41 @@
#[macro_export]
macro_rules! format_error {
($($args:tt)*) => {{
format!("[ERROR] {}", format_args!($($args)*))
}};
}
#[macro_export]
macro_rules! format_warning {
($($args:tt)*) => {{
format!("[WARN] {}", format_args!($($args)*))
}};
}
#[macro_export]
macro_rules! format_info {
($($args:tt)*) => {{
format!("[INFO] {}", format_args!($($args)*))
}};
}
#[macro_export]
macro_rules! print_error {
($($args:tt)*) => {{
println!("[ERROR] {}", format_args!($($args)*))
}};
}
#[macro_export]
macro_rules! print_warning {
($($args:tt)*) => {{
println!("[WARN] {}", format_args!($($args)*))
}};
}
#[macro_export]
macro_rules! print_info {
($($args:tt)*) => {{
println!("[INFO] {}", format_args!($($args)*))
}};
}