We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec015a0 commit a5076d1Copy full SHA for a5076d1
1 file changed
client/src/file/api/attribute_value.rs
@@ -1,3 +1,5 @@
1
+use std::ops::Deref;
2
+
3
use serde::{Deserialize, Serialize};
4
use zbus::zvariant::Type;
5
use zeroize::{Zeroize, ZeroizeOnDrop};
@@ -26,9 +28,21 @@ impl AsRef<str> for AttributeValue {
26
28
}
27
29
30
-impl std::ops::Deref for AttributeValue {
31
+impl Deref for AttributeValue {
32
type Target = str;
33
fn deref(&self) -> &Self::Target {
34
self.0.as_str()
35
36
37
38
+impl PartialEq<str> for AttributeValue {
39
+ fn eq(&self, other: &str) -> bool {
40
+ self.deref() == other
41
+ }
42
+}
43
44
+impl PartialEq<&str> for AttributeValue {
45
+ fn eq(&self, other: &&str) -> bool {
46
+ self.deref() == *other
47
48
0 commit comments