This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +203
-194
lines changed Expand file tree Collapse file tree 9 files changed +203
-194
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ Brian Anderson <banderson@mozilla.com> <andersrb@gmail.com>
4343Brian Anderson <banderson@mozilla.com> <banderson@mozilla.org>
4444Brian Dawn <brian.t.dawn@gmail.com>
4545Brian Leibig <brian@brianleibig.com> Brian Leibig <brian.leibig@gmail.com>
46+ Noah Lev <camelidcamel@gmail.com>
4647Noah Lev <camelidcamel@gmail.com> <37223377+camelid@users.noreply.github.com>
4748Carl-Anton Ingmarsson <mail@carlanton.se> <ca.ingmarsson@gmail.com>
4849Carol (Nichols || Goulding) <carol.nichols@gmail.com> <193874+carols10cents@users.noreply.github.com>
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
Original file line number Diff line number Diff line change @@ -526,7 +526,12 @@ pub trait Read {
526526 ///
527527 /// 1. This reader has reached its "end of file" and will likely no longer
528528 /// be able to produce bytes. Note that this does not mean that the
529- /// reader will *always* no longer be able to produce bytes.
529+ /// reader will *always* no longer be able to produce bytes. As an example,
530+ /// on Linux, this method will call the `recv` syscall for a [`TcpStream`],
531+ /// where returning zero indicates the connection was shut down correctly. While
532+ /// for [`File`], it is possible to reach the end of file and get zero as result,
533+ /// but if more data is appended to the file, future calls to `read` will return
534+ /// more data.
530535 /// 2. The buffer specified was 0 bytes in length.
531536 ///
532537 /// It is not an error if the returned value `n` is smaller than the buffer size,
@@ -568,6 +573,7 @@ pub trait Read {
568573 ///
569574 /// [`Ok(n)`]: Ok
570575 /// [`File`]: crate::fs::File
576+ /// [`TcpStream`]: crate::net::TcpStream
571577 ///
572578 /// ```no_run
573579 /// use std::io;
Original file line number Diff line number Diff line change @@ -345,6 +345,9 @@ mod prim_never {}
345345mod prim_char { }
346346
347347#[ doc( primitive = "unit" ) ]
348+ #[ doc( alias = "(" ) ]
349+ #[ doc( alias = ")" ) ]
350+ #[ doc( alias = "()" ) ]
348351//
349352/// The `()` type, also called "unit".
350353///
You can’t perform that action at this time.
0 commit comments