From: Ian Jackson Date: Sun, 14 Feb 2021 21:02:42 +0000 (+0000) Subject: Rename otter::imports to otter::prelude X-Git-Tag: otter-0.4.0~488 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=97db064cc4f0fca0241426b7068120f09a637609;p=otter.git Rename otter::imports to otter::prelude imports is going to be just the dependencies Signed-off-by: Ian Jackson --- diff --git a/daemon/main.rs b/daemon/main.rs index cc0534e6..dfe1f6c5 100644 --- a/daemon/main.rs +++ b/daemon/main.rs @@ -33,7 +33,7 @@ use rocket::fairing; use rocket::response::Content; use rocket_contrib::serve::StaticFiles; -use otter::imports::*; +use otter::prelude::*; #[derive(Serialize,Debug)] struct FrontPageRenderContext { diff --git a/src/accounts.rs b/src/accounts.rs index 8a37e6fa..36031b3c 100644 --- a/src/accounts.rs +++ b/src/accounts.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; use parking_lot::{Mutex, const_mutex, MutexGuard}; @@ -441,7 +441,7 @@ pub fn load_accounts() { //---------- acl handling ---------- pub mod loaded_acl { - use crate::imports::*; + use crate::prelude::*; use authproofs::*; pub trait Perm: FromPrimitive + ToPrimitive + diff --git a/src/authproofs.rs b/src/authproofs.rs index 0d22c44e..c04752fa 100644 --- a/src/authproofs.rs +++ b/src/authproofs.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; #[derive(Copy,Clone,Debug)] pub struct Global; diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 39fd7747..87018842 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -12,8 +12,8 @@ use argparse::{self,ArgumentParser,action::{TypedAction,ParseResult}}; use argparse::action::{Action,IFlagAction,IArgAction}; use derive_more::Display; +use otter::prelude::*; use otter::commands::*; -use otter::imports::*; type APE = ArgumentParseError; type E = anyhow::Error; diff --git a/src/bin/otterlib.rs b/src/bin/otterlib.rs index 77d4b053..34ed47f7 100644 --- a/src/bin/otterlib.rs +++ b/src/bin/otterlib.rs @@ -37,7 +37,7 @@ If you wish to edit these shapes you should probably start with the source code. "##; -pub use otter::imports::*; +pub use otter::prelude::*; pub use shapelib::*; diff --git a/src/commands.rs b/src/commands.rs index 458efad7..1d60d3af 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; pub type MC = MgmtCommand; pub type MGI = MgmtGameInstruction; diff --git a/src/config.rs b/src/config.rs index 5e1dfd7f..173717df 100644 --- a/src/config.rs +++ b/src/config.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; pub const EXIT_SPACE : i32 = 2; pub const EXIT_NOTFOUND : i32 = 4; diff --git a/src/debugreader.rs b/src/debugreader.rs index 354154e5..9ab6aec2 100644 --- a/src/debugreader.rs +++ b/src/debugreader.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MIT-0 OR AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; #[derive(Debug)] pub struct DebugReader(pub T, pub ClientId); diff --git a/src/error.rs b/src/error.rs index 0a886b09..11cccb37 100644 --- a/src/error.rs +++ b/src/error.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; #[derive(Error,Debug)] pub enum OnlineError { diff --git a/src/gamestate.rs b/src/gamestate.rs index 905df113..1edc3e3e 100644 --- a/src/gamestate.rs +++ b/src/gamestate.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; // ---------- newtypes and type aliases ---------- diff --git a/src/global.rs b/src/global.rs index df1c6b8b..373da0df 100644 --- a/src/global.rs +++ b/src/global.rs @@ -4,7 +4,7 @@ #![allow(clippy::let_and_return)] -use crate::imports::*; +use crate::prelude::*; use slotmap::dense as sm; use std::sync::PoisonError; diff --git a/src/hidden.rs b/src/hidden.rs index 9164976a..aba911bd 100644 --- a/src/hidden.rs +++ b/src/hidden.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; use slotmap::secondary; diff --git a/src/keydata.rs b/src/keydata.rs index 48766e32..16569b66 100644 --- a/src/keydata.rs +++ b/src/keydata.rs @@ -4,7 +4,7 @@ #![allow(clippy::many_single_char_names)] -use crate::imports::*; +use crate::prelude::*; type SKD = slotmap::KeyData; diff --git a/src/lib.rs b/src/lib.rs index 2fa2beb9..cee9fc43 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,7 +13,7 @@ pub mod error; pub mod gamestate; pub mod global; pub mod hidden; -pub mod imports; +pub mod prelude; pub mod keydata; pub mod mgmtchannel; pub mod nwtemplates; diff --git a/src/mgmtchannel.rs b/src/mgmtchannel.rs index dfacb387..5f8b916c 100644 --- a/src/mgmtchannel.rs +++ b/src/mgmtchannel.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; use crate::commands::*; #[derive(Debug,Error)] diff --git a/src/nwtemplates.rs b/src/nwtemplates.rs index 9680baf8..697a735f 100644 --- a/src/nwtemplates.rs +++ b/src/nwtemplates.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; use parking_lot::MappedRwLockReadGuard; use parking_lot::{const_rwlock, RwLock, RwLockReadGuard}; diff --git a/src/pieces.rs b/src/pieces.rs index a700bef7..be33475a 100644 --- a/src/pieces.rs +++ b/src/pieces.rs @@ -4,7 +4,7 @@ // pieces -use crate::imports::*; +use crate::prelude::*; use piece_specs::SimpleCommon; diff --git a/src/imports.rs b/src/prelude.rs similarity index 100% rename from src/imports.rs rename to src/prelude.rs diff --git a/src/shapelib-toml.rs b/src/shapelib-toml.rs index cc89cf7e..b983f1e1 100644 --- a/src/shapelib-toml.rs +++ b/src/shapelib-toml.rs @@ -19,7 +19,7 @@ //! the provided `library/wikimedia.toml` and `library/edited.toml`, //! which demonstrate the use of the various features. -pub use crate::imports::*; +pub use crate::prelude::*; #[doc(hidden)] pub type LLE = shapelib::LibraryLoadError; diff --git a/src/shapelib.rs b/src/shapelib.rs index 38d0ceff..26743e3e 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -pub use crate::imports::*; +pub use crate::prelude::*; pub use crate::shapelib_toml::*; use parking_lot::{const_rwlock, RwLock}; diff --git a/src/spec.rs b/src/spec.rs index 0102bce3..0e2d121a 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -231,7 +231,7 @@ pub mod piece_specs { pub mod pos_traits { use std::ops::{Add,Sub,Mul,Neg,AddAssign,SubAssign}; - use crate::imports::*; + use crate::prelude::*; impl+Copy+Clone+Debug> Add> for PosC { type Output = PosC; @@ -309,7 +309,7 @@ pub mod pos_traits { pub mod implementation { use super::*; - use crate::imports::*; + use crate::prelude::*; type AS = AccountScope; type TPS = TablePlayerSpec; diff --git a/src/sse.rs b/src/sse.rs index ead62d5a..ab4af119 100644 --- a/src/sse.rs +++ b/src/sse.rs @@ -5,7 +5,7 @@ #![allow(clippy::while_let_loop)] #![allow(clippy::blocks_in_if_conditions)] -use crate::imports::*; +use crate::prelude::*; use vecdeque_stableix::Offset as StableIndexOffset; use std::ops::Neg; diff --git a/src/tz.rs b/src/tz.rs index 4d589fd4..002a94af 100644 --- a/src/tz.rs +++ b/src/tz.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; use parking_lot::{const_rwlock, RwLock}; diff --git a/src/ui.rs b/src/ui.rs index 570d054c..94cf81f0 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. -use crate::imports::*; +use crate::prelude::*; pub const SVG_SCALE: f64 = 6.; diff --git a/src/updates.rs b/src/updates.rs index 84896e63..9bf07a7f 100644 --- a/src/updates.rs +++ b/src/updates.rs @@ -4,7 +4,7 @@ // update messages from server to client -use crate::imports::*; +use crate::prelude::*; #[allow(non_camel_case_types)] type PUE_P = PreparedUpdateEntry_Piece; #[allow(non_camel_case_types)] type TUE_P<'u> = TransmitUpdateEntry_Piece<'u>;