Modularize + Refactoring code
This commit is contained in:
parent
813280350f
commit
00ab67b212
23 changed files with 2001 additions and 87 deletions
5
engine_utils/Cargo.lock
generated
Normal file
5
engine_utils/Cargo.lock
generated
Normal 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
9
engine_utils/Cargo.toml
Normal 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
41
engine_utils/src/lib.rs
Normal 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)*))
|
||||
}};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue