-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathlib.rs
More file actions
38 lines (34 loc) · 784 Bytes
/
lib.rs
File metadata and controls
38 lines (34 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#![allow(clippy::get_first)]
#![feature(trait_upcasting)]
#![feature(mapped_lock_guards)]
pub mod backends;
pub mod frontend;
pub mod lang;
pub mod middleware;
#[cfg(any(test, feature = "examples"))]
pub mod examples;
#[cfg(feature = "time")]
pub mod time_macros {
#[macro_export]
macro_rules! timed {
($ctx:expr, $exp:expr) => {{
let start = std::time::Instant::now();
let res = $exp;
println!(
"timed \"{}\": {:?}",
$ctx,
std::time::Instant::now() - start
);
res
}};
}
}
#[cfg(not(feature = "time"))]
pub mod time_macros {
#[macro_export]
macro_rules! timed {
($ctx:expr, $exp:expr) => {{
$exp
}};
}
}