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.
1 parent ffa754b commit 19b1070Copy full SHA for 19b1070
library/core/src/panic/location.rs
@@ -49,7 +49,9 @@ pub struct Location<'a> {
49
#[stable(feature = "panic_hooks", since = "1.10.0")]
50
impl PartialEq for Location<'_> {
51
fn eq(&self, other: &Self) -> bool {
52
- self.file() == other.file() && self.line == other.line && self.col == other.col
+ // Compare col / line first as they're cheaper to compare and more likely to differ,
53
+ // while not impacting the result.
54
+ self.col == other.col && self.line == other.line && self.file() == other.file()
55
}
56
57
0 commit comments