It never gets unlocked, you have to drop the
You can add a method for that. With this particular Mutex impl you would not have to make a third state, since
MutexLockFuture doesn't bother other contenders until first polled, so it's okay to construct one.
But the enum has the lifetime from
SmolStackWithDevice, so I didn't intend it to be long-lived.
SmolSocket can actually be dropped, I didn't notice I did that.
l is a
&mut futures::lock::MutexGuard<'_, SmolStackWithDevice<'_>>
*l is a
futures::lock::MutexGuard<'_, SmolStackWithDevice<'_>> (we couldn't actually move this out and assign it to a local, but that's what it is at the type level)
**l is a
&mut **l is a
&mut SmolStackWithDevice<'_> because
Pin::new(&mut **l) is able to make a
Pin out of the mutable reference on the stack because
Unpin (doesn't care about being moved inbetween