]> git.dolda2000.com Git - kaka/rust-sdl-test.git/commitdiff
Use macro from common
authorTomas Wenström <tomas.wenstrom@gmail.com>
Sun, 7 Jul 2019 13:13:43 +0000 (15:13 +0200)
committerTomas Wenström <tomas.wenstrom@gmail.com>
Sun, 7 Jul 2019 13:13:43 +0000 (15:13 +0200)
Cargo.lock
src/app.rs
src/common.rs

index 61c7454d4f49c452c68590086c4ad125d5691ca8..7de4beba4cc39a518a3af10610649d4fe61a989e 100644 (file)
@@ -1,3 +1,5 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
 [[package]]
 name = "autocfg"
 version = "0.1.2"
index c8f8665cb63b759c174df73ac214474e197868ba..4972dfc8d78a3332de9b5505d18f1843af0d2753 100644 (file)
@@ -12,10 +12,7 @@ use boll::*;
 use common::Point2D;
 use sprites::SpriteManager;
 use NS_PER_FRAME;
-
-macro_rules! point { // because I don't know how to import it from common.rs ...
-    ( $x:expr, $y:expr ) => { Point2D { x:$x, y:$y } };
-}
+use point; // defined in common, but loaded from main...
 
 pub type Nanoseconds = u64;
 
index f3b3373fcf4c553018cce9926aac751f3fe8f26e..6f000d8762abffc8410b016da5ae28b20c39aa2f 100644 (file)
@@ -1,5 +1,6 @@
 use std::ops::{Add, AddAssign};
 
+#[macro_export]
 macro_rules! point {
     ( $x:expr, $y:expr ) => { Point2D { x:$x, y:$y } };
 }