diff options
-rw-r--r-- | rust/kernel/str.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index 28e2201604d6..002dcddf7c76 100644 --- a/rust/kernel/str.rs +++ b/rust/kernel/str.rs @@ -108,6 +108,12 @@ impl Deref for BStr { } } +impl PartialEq for BStr { + fn eq(&self, other: &Self) -> bool { + self.deref().eq(other.deref()) + } +} + /// Creates a new [`BStr`] from a string literal. /// /// `b_str!` converts the supplied string literal to byte string, so non-ASCII |