File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed
Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -466,7 +466,7 @@ This release was broken for Windows.
466466 * ` Protocol::tcp ` => ` Protocol::TCP ` .
467467 * ` Protocol::udp ` => ` Protocol::UDP ` .
468468* ** BREAKING:** Changed the signature of ` Socket::recv ` , ` Socket::recv_vectored `
469- and related methods to accept unitialised buffers. The ` Read ` implementation
469+ and related methods to accept uninitialised buffers. The ` Read ` implementation
470470 can be used to read into initialised buffers.
471471* ** BREAKING:** Renamed ` SockAddr::as_std ` to ` as_socket ` .
472472* ** BREAKING:** Renamed ` SockAddr::as_inet ` to ` as_socket_ipv4 ` .
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ impl SockAddr {
249249 & self . storage as * const sockaddr_storage as * const SockAddrStorage
250250 }
251251
252- /// Retuns the address as the storage.
252+ /// Returns the address as the storage.
253253 pub const fn as_storage ( self ) -> SockAddrStorage {
254254 SockAddrStorage {
255255 storage : self . storage ,
@@ -326,7 +326,7 @@ impl SockAddr {
326326 /// Returns the initialised storage bytes.
327327 fn as_bytes ( & self ) -> & [ u8 ] {
328328 // SAFETY: `self.storage` is a C struct which can always be treated a
329- // slice of bytes. Furthermore, we ensure we don't read any unitialised
329+ // slice of bytes. Furthermore, we ensure we don't read any uninitialised
330330 // bytes by using `self.len`.
331331 unsafe { std:: slice:: from_raw_parts ( self . as_ptr ( ) . cast ( ) , self . len as usize ) }
332332 }
Original file line number Diff line number Diff line change @@ -493,7 +493,7 @@ impl Socket {
493493 sys:: recv_vectored ( self . as_raw ( ) , bufs, flags)
494494 }
495495
496- /// Receives data on the socket from the remote adress to which it is
496+ /// Receives data on the socket from the remote address to which it is
497497 /// connected, without removing that data from the queue. On success,
498498 /// returns the number of bytes peeked.
499499 ///
@@ -2254,7 +2254,7 @@ impl Read for Socket {
22542254 fn read_vectored ( & mut self , bufs : & mut [ IoSliceMut < ' _ > ] ) -> io:: Result < usize > {
22552255 // Safety: both `IoSliceMut` and `MaybeUninitSlice` promise to have the
22562256 // same layout, that of `iovec`/`WSABUF`. Furthermore, `recv_vectored`
2257- // promises to not write unitialised bytes to the `bufs` and pass it
2257+ // promises to not write uninitialised bytes to the `bufs` and pass it
22582258 // directly to the `recvmsg` system call, so this is safe.
22592259 let bufs = unsafe { & mut * ( bufs as * mut [ IoSliceMut < ' _ > ] as * mut [ MaybeUninitSlice < ' _ > ] ) } ;
22602260 self . recv_vectored ( bufs) . map ( |( n, _) | n)
Original file line number Diff line number Diff line change @@ -780,7 +780,7 @@ impl SockAddr {
780780 . unwrap_or_default ( )
781781 }
782782
783- /// Returns the underlying `sockaddr_un` object if this addres is from the `AF_UNIX` family,
783+ /// Returns the underlying `sockaddr_un` object if this address is from the `AF_UNIX` family,
784784 /// otherwise returns `None`.
785785 pub ( crate ) fn as_sockaddr_un ( & self ) -> Option < & libc:: sockaddr_un > {
786786 self . is_unix ( ) . then ( || {
Original file line number Diff line number Diff line change @@ -1871,7 +1871,7 @@ fn set_priority() {
18711871 let socket = Socket :: new ( Domain :: UNIX , Type :: DGRAM , None ) . unwrap ( ) ;
18721872 assert ! ( socket. priority( ) . unwrap( ) == 0 ) ;
18731873
1874- // test priorities 6 .. 0; values above 6 require additional priviledges
1874+ // test priorities 6 .. 0; values above 6 require additional privileges
18751875 for i in ( 0 ..=6 ) . rev ( ) {
18761876 socket. set_priority ( i) . unwrap ( ) ;
18771877 assert ! ( socket. priority( ) . unwrap( ) == i) ;
@@ -1884,7 +1884,7 @@ fn set_busy_poll() {
18841884 let socket = Socket :: new ( Domain :: UNIX , Type :: DGRAM , None ) . unwrap ( ) ;
18851885 assert ! ( socket. busy_poll( ) . unwrap( ) == 0 ) ;
18861886
1887- // test busy poll values 0 .. 6; values above 6 require additional priviledges
1887+ // test busy poll values 0 .. 6; values above 6 require additional privileges
18881888 for i in ( 0 ..=6 ) . rev ( ) {
18891889 socket. set_busy_poll ( i) . unwrap ( ) ;
18901890 assert ! ( socket. busy_poll( ) . unwrap( ) == i) ;
You can’t perform that action at this time.
0 commit comments