Created
July 23, 2025 19:24
-
-
Save saghm/7ecd9ebcc3d1989622484894f77f00af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Nested<T> { | |
fn unnest(self) -> T; | |
} | |
impl<T> Nested<Self> for Option<T> { | |
fn unnest(self) -> T { | |
self | |
} | |
} | |
impl<T, U> Nested<U> for Option<Option<T>> | |
where | |
Option<T>: Nested<U>, | |
{ | |
fn unnest(self) -> U { | |
todo!() | |
} | |
} | |
fn main() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment