diff --git a/src/lib.rs b/src/lib.rs index e11a9057..83811abe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -455,7 +455,7 @@ pub(crate) mod tests { thread_local! { /// Number of active [`SilentPanicGuard`] in the current thread. If /// this is greater than one, panics will be silenced. - static SILENCE_DEPTH: Cell = Cell::new(0); + static SILENCE_DEPTH: Cell = const { Cell::new(0) }; } // impl SilentPanicGuard { diff --git a/src/topology/export/xml.rs b/src/topology/export/xml.rs index 4d21873f..6815286f 100644 --- a/src/topology/export/xml.rs +++ b/src/topology/export/xml.rs @@ -318,16 +318,16 @@ impl Ord for XML<'_> { impl PartialEq for XML<'_> { fn eq(&self, other: &Self) -> bool { - self.as_str().eq(other.as_str()) + self.as_str() == other.as_str() } } impl PartialEq for XML<'_> where - str: PartialEq, + for<'a> &'a str: PartialEq, { fn eq(&self, other: &T) -> bool { - self.as_str().eq(other) + self.as_str() == *other } }