fix using fayalite as a dependency #24

Merged
programmerjake merged 1 commit from programmerjake/fayalite:phantom-const-fix into master 2025-03-10 06:45:41 +00:00

View file

@ -84,7 +84,7 @@ impl<'de> Deserialize<'de> for PhantomConstCanonicalValue {
}
pub trait PhantomConstValue: Intern + InternedCompare + Serialize + fmt::Debug {
fn deserialize<'de, D>(deserializer: D) -> Result<Interned<Self>, D::Error>
fn deserialize_value<'de, D>(deserializer: D) -> Result<Interned<Self>, D::Error>
where
D: serde::Deserializer<'de>;
}
@ -94,7 +94,7 @@ where
T: ?Sized + Intern + InternedCompare + Serialize + fmt::Debug,
Interned<T>: DeserializeOwned,
{
fn deserialize<'de, D>(deserializer: D) -> Result<Interned<Self>, D::Error>
fn deserialize_value<'de, D>(deserializer: D) -> Result<Interned<Self>, D::Error>
where
D: serde::Deserializer<'de>,
{
@ -189,7 +189,8 @@ impl<T: ?Sized + PhantomConstValue> Memoize for PhantomConstCanonicalMemoize<T,
type Output = Interned<T>;
fn inner(self, input: &Self::Input) -> Self::Output {
PhantomConstValue::deserialize(input.as_json_value()).expect("deserialization failed ")
PhantomConstValue::deserialize_value(input.as_json_value())
.expect("deserialization failed ")
}
}