We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d835f0f commit 478c24cCopy full SHA for 478c24c
2 files changed
Cargo.toml
@@ -1,7 +1,7 @@
1
[package]
2
3
name = "string_cache"
4
-version = "0.2.14"
+version = "0.2.15"
5
authors = [ "The Servo Project Developers" ]
6
description = "A string interning library for Rust, developed as part of the Servo project."
7
license = "MIT / Apache-2.0"
src/atom/mod.rs
@@ -182,6 +182,18 @@ impl Atom {
182
}
183
184
185
+impl PartialEq<str> for Atom {
186
+ fn eq(&self, other: &str) -> bool {
187
+ &self[..] == other
188
+ }
189
+}
190
+
191
+impl PartialEq<Atom> for str {
192
+ fn eq(&self, other: &Atom) -> bool {
193
+ self == &other[..]
194
195
196
197
impl<'a> From<Cow<'a, str>> for Atom {
198
#[inline]
199
fn from(string_to_add: Cow<'a, str>) -> Atom {
0 commit comments