diff --git a/cordyceps/src/list.rs b/cordyceps/src/list.rs index 45fc4eb5..0dab64f4 100644 --- a/cordyceps/src/list.rs +++ b/cordyceps/src/list.rs @@ -760,6 +760,17 @@ where // as well, so that we can just call `push_back` without looping. } +impl iter::FromIterator for List +where + T: Linked> + ?Sized, +{ + fn from_iter>(iter: I) -> Self { + let mut list = Self::new(); + list.extend(iter); + list + } +} + unsafe impl> + ?Sized> Send for List where T: Send {} unsafe impl> + ?Sized> Sync for List where T: Sync {}