From 7fd1cb661c818c0beaea312f2d49f39a7316e8a9 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Wed, 4 Dec 2024 14:08:39 +0100 Subject: [PATCH] remove rubicon (merde has a single ABI now anyway) --- Cargo.lock | 7 ------- merde_core/Cargo.toml | 1 - merde_core/src/cowstr.rs | 18 ------------------ merde_core/src/lib.rs | 4 ---- 4 files changed, 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9bc91f..fa05cb4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -334,7 +334,6 @@ dependencies = [ "compact_str", "insta", "ordered-float", - "rubicon", "rusqlite", "serde", "time", @@ -478,12 +477,6 @@ dependencies = [ "paste", ] -[[package]] -name = "rubicon" -version = "3.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df530fafa5c66f7f964f24310867c75ad19d3869bcc86f5befdcc41eafa3ac9d" - [[package]] name = "rusqlite" version = "0.32.1" diff --git a/merde_core/Cargo.toml b/merde_core/Cargo.toml index 79a66bd..8565f12 100644 --- a/merde_core/Cargo.toml +++ b/merde_core/Cargo.toml @@ -15,7 +15,6 @@ rust-version = "1.83" compact_str = { version = "0.8.0" } compact_bytes = { version = "0.1.3" } ordered-float = "4.3.0" -rubicon = "3.4.9" rusqlite = { version = "0.32.1", optional = true } serde = { version = "1", optional = true } time = { version = "0.3.36", optional = true, features = ["parsing", "formatting"] } diff --git a/merde_core/src/cowstr.rs b/merde_core/src/cowstr.rs index 2889f73..e34fc55 100644 --- a/merde_core/src/cowstr.rs +++ b/merde_core/src/cowstr.rs @@ -57,8 +57,6 @@ impl<'s> CowStr<'s> { impl AsRef for CowStr<'_> { #[inline] fn as_ref(&self) -> &str { - crate::compatibility_check_once(); - match self { CowStr::Borrowed(s) => s, CowStr::Owned(s) => s.as_str(), @@ -71,8 +69,6 @@ impl Deref for CowStr<'_> { #[inline] fn deref(&self) -> &Self::Target { - crate::compatibility_check_once(); - match self { CowStr::Borrowed(s) => s, CowStr::Owned(s) => s.as_str(), @@ -144,7 +140,6 @@ impl From> for Box { impl<'a> PartialEq> for CowStr<'_> { #[inline] fn eq(&self, other: &CowStr<'a>) -> bool { - crate::compatibility_check_once(); self.deref() == other.deref() } } @@ -152,7 +147,6 @@ impl<'a> PartialEq> for CowStr<'_> { impl PartialEq<&str> for CowStr<'_> { #[inline] fn eq(&self, other: &&str) -> bool { - crate::compatibility_check_once(); self.deref() == *other } } @@ -160,7 +154,6 @@ impl PartialEq<&str> for CowStr<'_> { impl PartialEq> for &str { #[inline] fn eq(&self, other: &CowStr<'_>) -> bool { - crate::compatibility_check_once(); *self == other.deref() } } @@ -168,7 +161,6 @@ impl PartialEq> for &str { impl PartialEq for CowStr<'_> { #[inline] fn eq(&self, other: &String) -> bool { - crate::compatibility_check_once(); self.deref() == other.as_str() } } @@ -176,7 +168,6 @@ impl PartialEq for CowStr<'_> { impl PartialEq> for String { #[inline] fn eq(&self, other: &CowStr<'_>) -> bool { - crate::compatibility_check_once(); self.as_str() == other.deref() } } @@ -186,7 +177,6 @@ impl Eq for CowStr<'_> {} impl Hash for CowStr<'_> { #[inline] fn hash(&self, state: &mut H) { - crate::compatibility_check_once(); self.deref().hash(state) } } @@ -194,7 +184,6 @@ impl Hash for CowStr<'_> { impl fmt::Debug for CowStr<'_> { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - crate::compatibility_check_once(); self.deref().fmt(f) } } @@ -202,7 +191,6 @@ impl fmt::Debug for CowStr<'_> { impl fmt::Display for CowStr<'_> { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - crate::compatibility_check_once(); self.deref().fmt(f) } } @@ -212,7 +200,6 @@ impl IntoStatic for CowStr<'_> { #[inline] fn into_static(self) -> Self::Output { - crate::compatibility_check_once(); match self { CowStr::Borrowed(s) => CowStr::Owned((*s).into()), CowStr::Owned(s) => CowStr::Owned(s), @@ -232,7 +219,6 @@ mod serde_impls { where S: serde::Serializer, { - crate::compatibility_check_once(); serializer.serialize_str(self) } } @@ -243,8 +229,6 @@ mod serde_impls { where D: serde::Deserializer<'de>, { - crate::compatibility_check_once(); - struct CowStrVisitor; impl<'de> serde::de::Visitor<'de> for CowStrVisitor { @@ -293,7 +277,6 @@ mod rusqlite_impls { impl ToSql for CowStr<'_> { #[inline] fn to_sql(&self) -> RusqliteResult> { - crate::compatibility_check_once(); Ok(rusqlite::types::ToSqlOutput::Borrowed(self.as_ref().into())) } } @@ -301,7 +284,6 @@ mod rusqlite_impls { impl FromSql for CowStr<'_> { #[inline] fn column_result(value: rusqlite::types::ValueRef<'_>) -> Result { - crate::compatibility_check_once(); match value { rusqlite::types::ValueRef::Text(s) => Ok(CowStr::from_utf8(s) .map_err(|e| FromSqlError::Other(Box::new(e)))? diff --git a/merde_core/src/lib.rs b/merde_core/src/lib.rs index 0ecfd41..a0a58db 100644 --- a/merde_core/src/lib.rs +++ b/merde_core/src/lib.rs @@ -54,7 +54,3 @@ pub use deserialize::DynDeserializerExt; pub use deserialize::FieldSlot; pub mod time; - -rubicon::compatibility_check! { - ("merde_core_pkg_version", env!("CARGO_PKG_VERSION")), -}