File tree 9 files changed +203
-194
lines changed
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>
43
43
Brian Anderson <banderson@mozilla.com> <banderson@mozilla.org>
44
44
Brian Dawn <brian.t.dawn@gmail.com>
45
45
Brian Leibig <brian@brianleibig.com> Brian Leibig <brian.leibig@gmail.com>
46
+ Noah Lev <camelidcamel@gmail.com>
46
47
Noah Lev <camelidcamel@gmail.com> <37223377+camelid@users.noreply.github.com>
47
48
Carl-Anton Ingmarsson <mail@carlanton.se> <ca.ingmarsson@gmail.com>
48
49
Carol (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> {
442
442
}
443
443
}
444
444
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
-
466
445
/// Provides a forward iterator.
467
446
///
468
447
/// # Examples
Original file line number Diff line number Diff line change @@ -526,7 +526,12 @@ pub trait Read {
526
526
///
527
527
/// 1. This reader has reached its "end of file" and will likely no longer
528
528
/// 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.
530
535
/// 2. The buffer specified was 0 bytes in length.
531
536
///
532
537
/// It is not an error if the returned value `n` is smaller than the buffer size,
@@ -568,6 +573,7 @@ pub trait Read {
568
573
///
569
574
/// [`Ok(n)`]: Ok
570
575
/// [`File`]: crate::fs::File
576
+ /// [`TcpStream`]: crate::net::TcpStream
571
577
///
572
578
/// ```no_run
573
579
/// use std::io;
Original file line number Diff line number Diff line change @@ -345,6 +345,9 @@ mod prim_never {}
345
345
mod prim_char { }
346
346
347
347
#[ doc( primitive = "unit" ) ]
348
+ #[ doc( alias = "(" ) ]
349
+ #[ doc( alias = ")" ) ]
350
+ #[ doc( alias = "()" ) ]
348
351
//
349
352
/// The `()` type, also called "unit".
350
353
///
You can’t perform that action at this time.
0 commit comments