Add a take_unpinned
method: Pin<&mut Option<S>>
to Option<SProjectionOwned>
#359
Labels
C-enhancement
Category: A new feature or an improvement for an existing one
I think pin-project could provide a safe method from
Pin<&mut Option<S>>
toOption<SProjectionOwned>
which is a mix ofOption::take
,Pin::set(..., None)
andproject_replace
. I imagine it could look something like this:The following is an example where this could be useful (here
take_output
is whatpin_project
could provide a generic version of):The text was updated successfully, but these errors were encountered: