diff --git a/fixed_wide/Cargo.lock b/fixed_wide/Cargo.lock index b181692..c65cd17 100644 --- a/fixed_wide/Cargo.lock +++ b/fixed_wide/Cargo.lock @@ -13,16 +13,16 @@ name = "fixed_wide" version = "0.1.0" dependencies = [ "bnum", + "fixed_wide_traits", "typenum", - "wide_traits", ] +[[package]] +name = "fixed_wide_traits" +version = "0.1.0" + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "wide_traits" -version = "0.1.0" diff --git a/fixed_wide/Cargo.toml b/fixed_wide/Cargo.toml index dd50704..84206fd 100644 --- a/fixed_wide/Cargo.toml +++ b/fixed_wide/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" edition = "2021" [features] -default=["wide_traits"] -wide_traits=["dep:wide_traits"] +default=["fixed_wide_traits"] +fixed_wide_traits=["dep:fixed_wide_traits"] [dependencies] bnum = "0.11.0" typenum = "1.17.0" -wide_traits = { version = "0.1.0", path = "../wide_traits", optional = true } +fixed_wide_traits = { version = "0.1.0", path = "../fixed_wide_traits", optional = true } diff --git a/fixed_wide/src/wide_traits.rs b/fixed_wide/src/fixed_wide_traits.rs similarity index 96% rename from fixed_wide/src/wide_traits.rs rename to fixed_wide/src/fixed_wide_traits.rs index 86bbae4..efc655e 100644 --- a/fixed_wide/src/wide_traits.rs +++ b/fixed_wide/src/fixed_wide_traits.rs @@ -2,7 +2,7 @@ use bnum::BInt; use bnum::cast::As; use typenum::{Sum,Unsigned}; use crate::fixed::Fixed; -use wide_traits::wide::WideMul; +use fixed_wide_traits::wide::WideMul; use std::marker::PhantomData; macro_rules! impl_wide_mul { diff --git a/fixed_wide/src/lib.rs b/fixed_wide/src/lib.rs index 7519abb..7f8c922 100644 --- a/fixed_wide/src/lib.rs +++ b/fixed_wide/src/lib.rs @@ -1,7 +1,7 @@ pub mod fixed; pub mod types; -#[cfg(feature="wide_traits")] -mod wide_traits; -#[cfg(feature="wide_traits")] -pub use ::wide_traits::wide; +#[cfg(feature="fixed_wide_traits")] +mod fixed_wide_traits; +#[cfg(feature="fixed_wide_traits")] +pub use ::fixed_wide_traits::wide; diff --git a/wide_traits/.gitignore b/fixed_wide_traits/.gitignore similarity index 100% rename from wide_traits/.gitignore rename to fixed_wide_traits/.gitignore diff --git a/wide_traits/Cargo.lock b/fixed_wide_traits/Cargo.lock similarity index 98% rename from wide_traits/Cargo.lock rename to fixed_wide_traits/Cargo.lock index a3a18a8..8ece885 100644 --- a/wide_traits/Cargo.lock +++ b/fixed_wide_traits/Cargo.lock @@ -38,6 +38,14 @@ dependencies = [ "typenum", ] +[[package]] +name = "fixed_wide_traits" +version = "0.1.0" +dependencies = [ + "fixed", + "typenum", +] + [[package]] name = "half" version = "2.4.1" @@ -53,11 +61,3 @@ name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "wide_traits" -version = "0.1.0" -dependencies = [ - "fixed", - "typenum", -] diff --git a/wide_traits/Cargo.toml b/fixed_wide_traits/Cargo.toml similarity index 81% rename from wide_traits/Cargo.toml rename to fixed_wide_traits/Cargo.toml index 806fb3e..b761c99 100644 --- a/wide_traits/Cargo.toml +++ b/fixed_wide_traits/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "wide_traits" +name = "fixed_wide_traits" version = "0.1.0" edition = "2021" diff --git a/wide_traits/src/lib.rs b/fixed_wide_traits/src/lib.rs similarity index 100% rename from wide_traits/src/lib.rs rename to fixed_wide_traits/src/lib.rs diff --git a/wide_traits/src/narrow.rs b/fixed_wide_traits/src/narrow.rs similarity index 100% rename from wide_traits/src/narrow.rs rename to fixed_wide_traits/src/narrow.rs diff --git a/wide_traits/src/wide.rs b/fixed_wide_traits/src/wide.rs similarity index 100% rename from wide_traits/src/wide.rs rename to fixed_wide_traits/src/wide.rs diff --git a/fixed_wide_vectors/Cargo.lock b/fixed_wide_vectors/Cargo.lock index 5c9399b..a0a650c 100644 --- a/fixed_wide_vectors/Cargo.lock +++ b/fixed_wide_vectors/Cargo.lock @@ -13,16 +13,20 @@ name = "fixed_wide" version = "0.1.0" dependencies = [ "bnum", + "fixed_wide_traits", "typenum", - "wide_traits", ] +[[package]] +name = "fixed_wide_traits" +version = "0.1.0" + [[package]] name = "fixed_wide_vectors" version = "0.1.0" dependencies = [ "fixed_wide", - "wide_traits", + "fixed_wide_traits", ] [[package]] @@ -30,7 +34,3 @@ name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "wide_traits" -version = "0.1.0" diff --git a/fixed_wide_vectors/Cargo.toml b/fixed_wide_vectors/Cargo.toml index 1b76fa9..55d64c0 100644 --- a/fixed_wide_vectors/Cargo.toml +++ b/fixed_wide_vectors/Cargo.toml @@ -4,11 +4,11 @@ version = "0.1.0" edition = "2021" [features] -default=["wide_traits"] -wide_traits=["dep:wide_traits"] +default=["fixed_wide_traits"] +fixed_wide_traits=["dep:fixed_wide_traits"] [dependencies] -wide_traits = { version = "0.1.0", path = "../wide_traits", optional = true } +fixed_wide_traits = { version = "0.1.0", path = "../fixed_wide_traits", optional = true } [dev-dependencies] fixed_wide = { version = "0.1.0", path = "../fixed_wide" } diff --git a/fixed_wide_vectors/src/macros/mod.rs b/fixed_wide_vectors/src/macros/mod.rs index 314de3c..0d899e2 100644 --- a/fixed_wide_vectors/src/macros/mod.rs +++ b/fixed_wide_vectors/src/macros/mod.rs @@ -1,4 +1,4 @@ -#[cfg(feature="wide_traits")] +#[cfg(feature="fixed_wide_traits")] pub mod wide; // Stolen from https://github.com/c1m50c/fixed-vectors (MIT license) diff --git a/fixed_wide_vectors/src/macros/wide.rs b/fixed_wide_vectors/src/macros/wide.rs index 434d383..c2c9c59 100644 --- a/fixed_wide_vectors/src/macros/wide.rs +++ b/fixed_wide_vectors/src/macros/wide.rs @@ -2,7 +2,7 @@ #[macro_export(local_inner_macros)] macro_rules! impl_wide_operations { ( $struct: ident { $($field: ident), + }, $size: expr ) => { - impl> wide_traits::wide::WideMul for $struct { + impl> fixed_wide_traits::wide::WideMul for $struct { type Output=$struct; #[inline] fn wide_mul(self, rhs: Self) -> Self::Output { @@ -11,7 +11,7 @@ macro_rules! impl_wide_operations { } } } - impl,T:Copy+wide_traits::wide::WideMul> $struct { + impl,T:Copy+fixed_wide_traits::wide::WideMul> $struct { #[inline] pub fn wide_dot(self, other: Self) -> U { $crate::sum_repeating!( diff --git a/fixed_wide_vectors/src/tests/mod.rs b/fixed_wide_vectors/src/tests/mod.rs index b48a11c..24bf782 100644 --- a/fixed_wide_vectors/src/tests/mod.rs +++ b/fixed_wide_vectors/src/tests/mod.rs @@ -1,4 +1,4 @@ -use wide_traits::wide::WideMul; +use fixed_wide_traits::wide::WideMul; use crate::Vector3;