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
pubfnmaybe_f32(foo:f32) -> Option<f32>{// ...}/// in testlet c = maybe_f32();assert_relative_eq!(maybe_f32(123.0),None);
I could do:
assert!(maybe_f32().is_none());
However, the advantage with the first version, is that on failure I can also see the actual value that was returned from maybe_f32, speeding up debugging a little bit.
The text was updated successfully, but these errors were encountered:
I'd like to be able to write the following code:
I could do:
However, the advantage with the first version, is that on failure I can also see the actual value that was returned from
maybe_f32
, speeding up debugging a little bit.The text was updated successfully, but these errors were encountered: