That’s an interesting observation, but it’s incomplete in a way that I think obscures a large part of the value: the IntoIterator::into_iter call and resulting temporary.
So what if there were an IntoOption trait? Would that be useful? I could imagine something like
if x in &some_mutex { x.foo() }
instead of
if let Ok(x) = some_mutex.lock() { x.foo() }
But I can’t decide if lock() or try_lock() is right there, and I don’t know if this is even ever a good idea.
(Especially if a option is Some(x) expression were to happen, like as been discussed before, which IMHO is short enough, while being more general and composing better, though I’m still uncertain about the binding scope questions.)