Rust's `Result::is_ok_and()` method will consume `self`, so I need to add an additional `.as_ref()` if I want to use it. Does anyone know the motivation behind this design?
#rust #rustlang
#rust #rustlang
Comments
https://github.com/rust-lang/rust/issues/93050#issuecomment-1176657005
usually for stuff like this i find myself doing a match `&result` instead. since i usually want to do something with the value