File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed
library/alloc/src/collections Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -442,27 +442,6 @@ impl<T> LinkedList<T> {
442442 }
443443 }
444444
445- /// Moves all elements from `other` to the begin of the list.
446- #[ unstable( feature = "linked_list_prepend" , issue = "none" ) ]
447- pub fn prepend ( & mut self , other : & mut Self ) {
448- match self . head {
449- None => mem:: swap ( self , other) ,
450- Some ( mut head) => {
451- // `as_mut` is okay here because we have exclusive access to the entirety
452- // of both lists.
453- if let Some ( mut other_tail) = other. tail . take ( ) {
454- unsafe {
455- head. as_mut ( ) . prev = Some ( other_tail) ;
456- other_tail. as_mut ( ) . next = Some ( head) ;
457- }
458-
459- self . head = other. head . take ( ) ;
460- self . len += mem:: replace ( & mut other. len , 0 ) ;
461- }
462- }
463- }
464- }
465-
466445 /// Provides a forward iterator.
467446 ///
468447 /// # Examples
You can’t perform that action at this time.
0 commit comments