We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ac655b + 1fb026c commit 0d0263eCopy full SHA for 0d0263e
std/src/path.rs
@@ -2107,7 +2107,7 @@ impl PartialEq for PathBuf {
2107
impl cmp::PartialEq<str> for PathBuf {
2108
#[inline]
2109
fn eq(&self, other: &str) -> bool {
2110
- &*self == other
+ Path::eq(self, other)
2111
}
2112
2113
std/tests/path.rs
@@ -2526,3 +2526,9 @@ fn normalize_lexically() {
2526
check_err(r"\\?\UNC\server\share\a\..\..");
2527
2528
2529
+
2530
+#[test]
2531
+/// See issue#146183
2532
+fn compare_path_to_str() {
2533
+ assert!(&PathBuf::from("x") == "x");
2534
+}
0 commit comments