From e2dd2330f47f43d0772ecf24838a03f18603a0a9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 14 Feb 2021 22:29:41 +0000 Subject: [PATCH] Reorganose dependencies: wip, arrayvec Signed-off-by: Ian Jackson --- Cargo.lock.example | 1 - Cargo.toml | 1 - base/imports.rs | 5 +++++ base/lib.rs | 2 ++ src/imports.rs | 2 ++ src/prelude.rs | 2 ++ src/utils.rs | 2 ++ 7 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 base/imports.rs diff --git a/Cargo.lock.example b/Cargo.lock.example index 2948fd17..c4b0fb3d 100644 --- a/Cargo.lock.example +++ b/Cargo.lock.example @@ -1582,7 +1582,6 @@ version = "0.3.0" dependencies = [ "anyhow", "argparse", - "arrayvec", "backtrace", "boolinator", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 8bdc4e78..2189118b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,6 @@ otter-base = { path = "base" } anyhow = "1" argparse = "0.2" -arrayvec = "0.5" backtrace = "0.3" boolinator = "2" chrono = "0.4" diff --git a/base/imports.rs b/base/imports.rs new file mode 100644 index 00000000..dba70141 --- /dev/null +++ b/base/imports.rs @@ -0,0 +1,5 @@ +// Copyright 2020-2021 Ian Jackson and contributors to Otter +// SPDX-License-Identifier: AGPL-3.0-or-later +// There is NO WARRANTY. + +pub use arrayvec; diff --git a/base/lib.rs b/base/lib.rs index 223d3c0a..e1b58a16 100644 --- a/base/lib.rs +++ b/base/lib.rs @@ -2,5 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. +pub mod imports; + pub mod zcoord; pub mod misc; diff --git a/src/imports.rs b/src/imports.rs index 778f1973..d08f15f6 100644 --- a/src/imports.rs +++ b/src/imports.rs @@ -2,4 +2,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. +pub use otter_base::imports::*; + pub use anyhow; diff --git a/src/prelude.rs b/src/prelude.rs index 6632643d..fa9c4f3c 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. +use crate::imports::*; + pub use std::any::Any; pub use std::borrow::Borrow; pub use std::borrow::Cow; diff --git a/src/utils.rs b/src/utils.rs index 43e4e472..f1916866 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // There is NO WARRANTY. +use crate::imports::*; + use std::fmt::{self, Debug}; use std::fs; use std::io; -- 2.30.2