diff --git a/src/trivial_impls.rs b/src/trivial_impls.rs index 960dde0..24baaf1 100644 --- a/src/trivial_impls.rs +++ b/src/trivial_impls.rs @@ -10,7 +10,7 @@ use crate::{Atom, StaticAtomSet}; #[cfg(feature = "serde_support")] use serde::{Deserialize, Deserializer, Serialize, Serializer}; -use std::borrow::Cow; +use std::borrow::{Borrow, Cow}; use std::fmt; impl ::precomputed_hash::PrecomputedHash for Atom { @@ -70,6 +70,12 @@ impl AsRef for Atom { } } +impl Borrow for Atom { + fn borrow(&self) -> &str { + self + } +} + #[cfg(feature = "serde_support")] impl Serialize for Atom { fn serialize(&self, serializer: S) -> Result