From 006dcca309c5e7c640b6be7d647effab8da2fdba Mon Sep 17 00:00:00 2001 From: Erin Date: Sat, 19 Aug 2023 23:24:31 +0200 Subject: [PATCH] cleaned up deps --- Cargo.lock | 62 ++++++++++++----------------------------------- hbvm/Cargo.toml | 3 --- hbvm/src/value.rs | 17 +++++++------ 3 files changed, 24 insertions(+), 58 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56e88bb..47ef3c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,9 +15,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56fc6cf8dc8c4158eed8649f9b8b0ea1518eb62b544fe9490d66fa0b349eafe9" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "ariadne" @@ -53,17 +53,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "delegate" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d358e0ec5c59a5e1603b933def447096886121660fc680dc1e64a0753981fe3c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "derive_more" version = "0.99.17" @@ -124,20 +113,11 @@ version = "0.1.0" name = "hbvm" version = "0.1.0" dependencies = [ - "delegate", "derive_more", "hbbytecode", - "paste", - "sealed", "static_assertions", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "lasso" version = "0.7.2" @@ -188,7 +168,7 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -208,24 +188,24 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -245,23 +225,11 @@ dependencies = [ "semver", ] -[[package]] -name = "sealed" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a8caec23b7800fb97971a1c6ae365b6239aaeddfb934d6265f8505e795699d" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.25", -] - [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "static_assertions" @@ -282,9 +250,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -293,9 +261,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-width" diff --git a/hbvm/Cargo.toml b/hbvm/Cargo.toml index ce3b565..d9c87cb 100644 --- a/hbvm/Cargo.toml +++ b/hbvm/Cargo.toml @@ -12,9 +12,6 @@ alloc = [] nightly = [] [dependencies] -delegate = "0.9" derive_more = "0.99" hbbytecode.path = "../hbbytecode" -paste = "1.0" -sealed = "0.5" static_assertions = "1.0" diff --git a/hbvm/src/value.rs b/hbvm/src/value.rs index 50d36d1..7401057 100644 --- a/hbvm/src/value.rs +++ b/hbvm/src/value.rs @@ -1,7 +1,5 @@ //! HoleyBytes register value definition -use sealed::sealed; - /// Define [`Value`] union /// /// # Safety @@ -33,7 +31,7 @@ macro_rules! value_def { core::mem::size_of::(), ); - #[sealed] + impl private::Sealed for $ty {} unsafe impl ValueVariant for $ty {} )* }; @@ -44,13 +42,13 @@ impl Value { #[inline] pub fn cast(self) -> V { /// Evil. - /// + /// /// Transmute cannot be performed with generic type /// as size is unknown, so union is used. - /// + /// /// # Safety /// If [`ValueVariant`] implemented correctly, it's fine :) - /// + /// /// :ferrisClueless: union Transmute { /// Self @@ -65,8 +63,11 @@ impl Value { /// # Safety /// - N/A, not to be implemented manually -#[sealed] -pub unsafe trait ValueVariant: Copy + Into {} +pub unsafe trait ValueVariant: private::Sealed + Copy + Into {} + +mod private { + pub trait Sealed {} +} value_def!(u64, i64, f64); static_assertions::const_assert_eq!(core::mem::size_of::(), 8);