Dolda2000 GitWeb
/
kaka
/
rust-sdl-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed common to util
[kaka/rust-sdl-test.git]
/
src
/
util
/
mod.rs
diff --git a/src/util/mod.rs
b/src/util/mod.rs
new file mode 100644
(file)
index 0000000..
2fb29cf
--- /dev/null
+++ b/
src/util/mod.rs
@@ -0,0
+1,13
@@
+mod time;
+pub use util::time::ScopeTimer;
+
+#[macro_export]
+macro_rules! hashmap {
+ ($($k:expr => $v:expr),*) => {
+ {
+ let mut map = std::collections::HashMap::new();
+ $(map.insert($k, $v);)*
+ map
+ }
+ }
+}