Add .cloned()
method to Result
?
#50951
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
It caught me off-guard that there isn't a
.cloned()
method forResult<&T, E>
, yet there is one forOption<&T>
.I don't think this is a big enough feature to have a whole RFC for, even though I can do that if necessary, but it would be nice to have a
.cloned()
method like this:and the equivalent mutable reference version.
However, if there is a reason why this is not already in place, I can understand. It simply feels a little awkward having to manually map
Clone::clone
in otherwise idiomatic code.The text was updated successfully, but these errors were encountered: