We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e5e63a commit 0250302Copy full SHA for 0250302
src/libstd/ffi/os_str.rs
@@ -417,6 +417,20 @@ impl PartialEq<OsString> for str {
417
}
418
419
420
+#[stable(feature = "rust1", since = "1.28.0")]
421
+impl<'a> PartialEq<&'a str> for OsString {
422
+ fn eq(&self, other: &&'a str) -> bool {
423
+ **self == **other
424
+ }
425
+}
426
+
427
428
+impl<'a> PartialEq<OsString> for &'a str {
429
+ fn eq(&self, other: &OsString) -> bool {
430
+ **other == **self
431
432
433
434
#[stable(feature = "rust1", since = "1.0.0")]
435
impl Eq for OsString {}
436
0 commit comments