Skip to content

Instantly share code, notes, and snippets.

@saghm
Created July 23, 2025 19:24
Show Gist options
  • Save saghm/7ecd9ebcc3d1989622484894f77f00af to your computer and use it in GitHub Desktop.
Save saghm/7ecd9ebcc3d1989622484894f77f00af to your computer and use it in GitHub Desktop.
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