You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An assertion failure can output a more useful message.
Drawbacks
No response
Example
assert!(self.some_method()
== local_value
.get_other_information(self.complex.expression[0], this.is.long),"The some_method result must be in sync with the other information.");
Could be written as:
assert_eq!(self.some_method(),
local_value.get_other_information(self.complex.expression[0], this.is.long),"The some_method result must be in sync with the other information.");
The text was updated successfully, but these errors were encountered:
What it does
assert!
on the result of std::cmp::PartialEq::eq, suggest usingassert_eq!
.debug_assert_eq!
.Advantage
An assertion failure can output a more useful message.
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: