Renamed common to util
authorTomas Wenström <tomas.wenstrom@gmail.com>
Sat, 13 Feb 2021 17:06:26 +0000 (18:06 +0100)
committerTomas Wenström <tomas.wenstrom@gmail.com>
Sat, 13 Feb 2021 17:06:26 +0000 (18:06 +0100)
src/core/app.rs
src/main.rs
src/util/mod.rs [moved from src/common/mod.rs with 84% similarity]
src/util/time.rs [moved from src/common/time.rs with 92% similarity]

index f5452fd..808277f 100644 (file)
@@ -2,7 +2,7 @@ use boll::*;
 use core::controller::ControllerManager;
 use core::render::Renderer;
 use geometry::{Point, Dimension};
-use point; // defined in common, but loaded from main...
+use point;
 use rand::Rng;
 use sdl2::event::{Event, WindowEvent};
 use sdl2::keyboard::Keycode;
index 4a88954..d60ad55 100644 (file)
@@ -7,11 +7,11 @@ use core::game::GameState;
 use core::app::*;
 
 mod boll;
-mod common;
 mod core;
 mod geometry;
 mod sprites;
 mod teststate;
+mod util;
 
 const SCREEN_WIDTH: u16 = 1280;
 const SCREEN_HEIGHT: u16 = (SCREEN_WIDTH as f64 * (1440.0 / 2560.0)) as u16;
similarity index 84%
rename from src/common/mod.rs
rename to src/util/mod.rs
index 36d3193..2fb29cf 100644 (file)
@@ -1,5 +1,5 @@
 mod time;
-pub use common::time::ScopeTimer;
+pub use util::time::ScopeTimer;
 
 #[macro_export]
 macro_rules! hashmap {
similarity index 92%
rename from src/common/time.rs
rename to src/util/time.rs
index 0902d94..b533bb6 100644 (file)
@@ -23,11 +23,11 @@ impl Drop for ScopeTimer {
 #[macro_export]
 macro_rules! time_scope {
     () => {
-       use common::ScopeTimer;
+       use util::ScopeTimer;
         let _magical_scope_timer_ = ScopeTimer::new("scope");
     };
     ( $name:expr ) => {
-       use common::ScopeTimer;
+       use util::ScopeTimer;
         let _magical_scope_timer_ = ScopeTimer::new($name);
     };
 }