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
let r:Result<i32, std::num::ParseIntError> = (|| -> Result<i32, std::num::ParseIntError>{Ok("1".parse::<i32>())})();
Gives:
mismatched types
expected type i32
found enum std::result::Result<i32, std::num::ParseIntError>
And this:
let r:Result<i32, std::num::ParseIntError> = (|| -> Result<i32, std::num::ParseIntError>{Ok("1".parse::<i32>()? + "2".parse::<i32>()?)})();
does not produce warning.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered:
tomaszdrozdz
changed the title
? operator for propagating Reslut, Option - is clippy give false positive warning ?
? operator for propagating Reslut, Option - does clippy give false positive warning ?
Apr 23, 2025
Description
Hello all,
Is this warning OK - or false positive ?
Gives:
But of course:
Gives:
And this:
does not produce warning.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: