From 5433a77fa53c337c07577dc02d769616945d58ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomas=20Wenstr=C3=B6m?= Date: Sat, 13 Feb 2021 18:06:26 +0100 Subject: [PATCH] Renamed common to util --- src/core/app.rs | 2 +- src/main.rs | 2 +- src/{common => util}/mod.rs | 2 +- src/{common => util}/time.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/{common => util}/mod.rs (84%) rename src/{common => util}/time.rs (92%) diff --git a/src/core/app.rs b/src/core/app.rs index f5452fd..808277f 100644 --- a/src/core/app.rs +++ b/src/core/app.rs @@ -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; diff --git a/src/main.rs b/src/main.rs index 4a88954..d60ad55 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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; diff --git a/src/common/mod.rs b/src/util/mod.rs similarity index 84% rename from src/common/mod.rs rename to src/util/mod.rs index 36d3193..2fb29cf 100644 --- a/src/common/mod.rs +++ b/src/util/mod.rs @@ -1,5 +1,5 @@ mod time; -pub use common::time::ScopeTimer; +pub use util::time::ScopeTimer; #[macro_export] macro_rules! hashmap { diff --git a/src/common/time.rs b/src/util/time.rs similarity index 92% rename from src/common/time.rs rename to src/util/time.rs index 0902d94..b533bb6 100644 --- a/src/common/time.rs +++ b/src/util/time.rs @@ -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); }; } -- 2.11.0