Implement Clone
for liballoc::collections::linked_list::Cursor
.
This commit is contained in:
parent
861996e138
commit
22e51cd78a
@ -1197,6 +1197,14 @@ pub struct Cursor<'a, T: 'a> {
|
||||
list: &'a LinkedList<T>,
|
||||
}
|
||||
|
||||
#[unstable(feature = "linked_list_cursors", issue = "58533")]
|
||||
impl<T> Clone for Cursor<'_, T> {
|
||||
fn clone(&self) -> Self {
|
||||
let Cursor { index, current, list } = *self;
|
||||
Cursor { index, current, list }
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "linked_list_cursors", issue = "58533")]
|
||||
impl<T: fmt::Debug> fmt::Debug for Cursor<'_, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
|
Loading…
Reference in New Issue
Block a user