Browse Source

Always use Join in the body of the run functions

Getty Ritter 4 years ago
parent
commit
66bab814a5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib.rs

+ 2 - 1
src/lib.rs

@@ -5,6 +5,7 @@ macro_rules! system {
         impl<'a> specs::System<'a> for $name {
             type SystemData = args_to_systemdata!(($($pat)*,));
             fn run(&mut self, args_to_fn_pat!(($($pat)*)): Self::SystemData) {
+                use specs::join::Join;
                 for args_to_join_pat!(($($pat)*,)) in args_to_join!(($($pat)*,)).join() {
                     $($rest)*
                 }
@@ -16,6 +17,7 @@ macro_rules! system {
         impl<'a> specs::System<'a> for $name {
             type SystemData = args_to_systemdata!($pat);
             fn run(&mut self, args_to_fn_pat!($pat): Self::SystemData) {
+                use specs::join::Join;
                 for args_to_join_pat!($pat) in args_to_join!($pat).join() {
                     $($rest)*
                 }
@@ -154,7 +156,6 @@ macro_rules! args_to_join {
 
 #[cfg(test)]
 mod tests {
-    use specs::join::Join;
 
     pub struct Pos {
         x: usize,