Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 373c9ec

Browse files
impl WIthLifetime for Option<T>
1 parent 5f81bc2 commit 373c9ec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

merde_core/src/with_lifetime.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ impl<'s> WithLifetime<'s> for () {
7070
type Lifetimed = ();
7171
}
7272

73+
impl<'s, T> WithLifetime<'s> for Option<T>
74+
where
75+
T: WithLifetime<'s>,
76+
{
77+
type Lifetimed = Option<T::Lifetimed>;
78+
}
79+
7380
impl<'s, T> WithLifetime<'s> for Vec<T>
7481
where
7582
T: WithLifetime<'s>,

0 commit comments

Comments
 (0)