Expand the packed option into a normal `Option`.
(self)
| 60 | |
| 61 | /// Expand the packed option into a normal `Option`. |
| 62 | pub fn expand(self) -> Option<T> { |
| 63 | if self.is_none() { None } else { Some(self.0) } |
| 64 | } |
| 65 | |
| 66 | /// Maps a `PackedOption<T>` to `Option<U>` by applying a function to a contained value. |
| 67 | pub fn map<U, F>(self, f: F) -> Option<U> |