Skip to content

Commit 464e54d

Browse files
TimTheBigSky9x
andauthored
Apply suggestions from code review
Co-authored-by: Sky <[email protected]>
1 parent 750828d commit 464e54d

File tree

8 files changed

+1
-18
lines changed

8 files changed

+1
-18
lines changed

library/alloc/src/bstr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ impl Default for ByteString {
213213

214214
#[unstable(feature = "bstr", issue = "134915")]
215215
impl From<ByteString> for Vec<u8> {
216-
/// Return the inner `Vec` of the byte string.
217216
#[inline]
218217
fn from(s: ByteString) -> Self {
219218
s.0

library/core/src/ptr/alignment.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ impl From<Alignment> for NonZero<usize> {
197197

198198
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
199199
impl From<Alignment> for usize {
200-
/// Return the inner value of `Alignment` as a `usize`.
201200
#[inline]
202201
fn from(align: Alignment) -> usize {
203202
align.as_usize()

library/core/src/range.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,13 @@ impl<T> IntoBounds<T> for Range<T> {
187187

188188
#[unstable(feature = "new_range_api", issue = "125687")]
189189
impl<T> From<Range<T>> for legacy::Range<T> {
190-
/// Make a new `legacy::Range` with the same start and end as `Range`
191190
#[inline]
192191
fn from(value: Range<T>) -> Self {
193192
Self { start: value.start, end: value.end }
194193
}
195194
}
196195
#[unstable(feature = "new_range_api", issue = "125687")]
197196
impl<T> From<legacy::Range<T>> for Range<T> {
198-
/// Make a new `Range` with the same start and end as `legacy::Range`
199197
#[inline]
200198
fn from(value: legacy::Range<T>) -> Self {
201199
Self { start: value.start, end: value.end }
@@ -365,15 +363,13 @@ impl<T> IntoBounds<T> for RangeInclusive<T> {
365363

366364
#[unstable(feature = "new_range_api", issue = "125687")]
367365
impl<T> From<RangeInclusive<T>> for legacy::RangeInclusive<T> {
368-
/// Make a new `legacy::RangeInclusive` with the same start and end as `RangeInclusive`
369366
#[inline]
370367
fn from(value: RangeInclusive<T>) -> Self {
371368
Self::new(value.start, value.end)
372369
}
373370
}
374371
#[unstable(feature = "new_range_api", issue = "125687")]
375372
impl<T> From<legacy::RangeInclusive<T>> for RangeInclusive<T> {
376-
/// Make a new `RangeInclusive` with the same start and end as `legacy::RangeInclusive`
377373
#[inline]
378374
fn from(value: legacy::RangeInclusive<T>) -> Self {
379375
assert!(
@@ -511,15 +507,13 @@ impl<T> IntoBounds<T> for RangeFrom<T> {
511507

512508
#[unstable(feature = "new_range_api", issue = "125687")]
513509
impl<T> From<RangeFrom<T>> for legacy::RangeFrom<T> {
514-
/// Make a new `legacy::RangeFrom` with the same start as `RangeFrom`
515510
#[inline]
516511
fn from(value: RangeFrom<T>) -> Self {
517512
Self { start: value.start }
518513
}
519514
}
520515
#[unstable(feature = "new_range_api", issue = "125687")]
521516
impl<T> From<legacy::RangeFrom<T>> for RangeFrom<T> {
522-
/// Make a new `RangeFrom` with the same start as `legacy::RangeFrom`
523517
#[inline]
524518
fn from(value: legacy::RangeFrom<T>) -> Self {
525519
Self { start: value.start }

library/proc_macro/src/bridge/buffer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ impl Drop for Buffer {
127127
}
128128

129129
impl From<Vec<u8>> for Buffer {
130-
/// Create a `Buffer` without allocation.\
131-
/// By moving data, len, and capacity from `Vec`, then create custom reserve and drop fns.
130+
/// Create a `Buffer` without allocation.
132131
fn from(v: Vec<u8>) -> Self {
133132
let mut v = ManuallyDrop::new(v);
134133
let (data, len, capacity) = (v.as_mut_ptr(), v.len(), v.capacity());

library/std/src/os/fd/owned.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ impl From<crate::net::TcpStream> for OwnedFd {
340340
#[stable(feature = "io_safety", since = "1.63.0")]
341341
#[cfg(not(target_os = "trusty"))]
342342
impl From<OwnedFd> for crate::net::TcpStream {
343-
/// Create a `TcpStream` with a [`OwnedFd`] as inner.
344343
#[inline]
345344
fn from(owned_fd: OwnedFd) -> Self {
346345
Self::from_inner(FromInner::from_inner(FromInner::from_inner(FromInner::from_inner(
@@ -371,7 +370,6 @@ impl From<crate::net::TcpListener> for OwnedFd {
371370
#[stable(feature = "io_safety", since = "1.63.0")]
372371
#[cfg(not(target_os = "trusty"))]
373372
impl From<OwnedFd> for crate::net::TcpListener {
374-
/// Create a `TcpListener` with a [`OwnedFd`] as inner.
375373
#[inline]
376374
fn from(owned_fd: OwnedFd) -> Self {
377375
Self::from_inner(FromInner::from_inner(FromInner::from_inner(FromInner::from_inner(
@@ -402,7 +400,6 @@ impl From<crate::net::UdpSocket> for OwnedFd {
402400
#[stable(feature = "io_safety", since = "1.63.0")]
403401
#[cfg(not(target_os = "trusty"))]
404402
impl From<OwnedFd> for crate::net::UdpSocket {
405-
/// Create a `UdpSocket` with a [`OwnedFd`] as inner.
406403
#[inline]
407404
fn from(owned_fd: OwnedFd) -> Self {
408405
Self::from_inner(FromInner::from_inner(FromInner::from_inner(FromInner::from_inner(

library/std/src/os/linux/process.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ impl AsFd for PidFd {
131131
}
132132

133133
impl From<OwnedFd> for PidFd {
134-
/// Make a `PidFd` from inner.
135134
fn from(fd: OwnedFd) -> Self {
136135
Self::from_inner(InnerPidFd::from_inner(FileDesc::from_inner(fd)))
137136
}

library/std/src/os/unix/net/listener.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ impl AsFd for UnixListener {
342342

343343
#[stable(feature = "io_safety", since = "1.63.0")]
344344
impl From<OwnedFd> for UnixListener {
345-
/// Make a `UnixListener` with `OwnedFd` as it's file descriptor.
346345
#[inline]
347346
fn from(fd: OwnedFd) -> UnixListener {
348347
UnixListener(Socket::from_inner(FromInner::from_inner(fd)))

library/std/src/os/windows/io/socket.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ impl From<crate::net::TcpStream> for OwnedSocket {
320320

321321
#[stable(feature = "io_safety", since = "1.63.0")]
322322
impl From<OwnedSocket> for crate::net::TcpStream {
323-
/// Make a `TcpStream` from [`OwnedSocket`]s underlying socket.
324323
#[inline]
325324
fn from(owned: OwnedSocket) -> Self {
326325
unsafe { Self::from_raw_socket(owned.into_raw_socket()) }
@@ -346,7 +345,6 @@ impl From<crate::net::TcpListener> for OwnedSocket {
346345

347346
#[stable(feature = "io_safety", since = "1.63.0")]
348347
impl From<OwnedSocket> for crate::net::TcpListener {
349-
/// Make a `TcpListener` from [`OwnedSocket`]s underlying socket.
350348
#[inline]
351349
fn from(owned: OwnedSocket) -> Self {
352350
unsafe { Self::from_raw_socket(owned.into_raw_socket()) }
@@ -372,7 +370,6 @@ impl From<crate::net::UdpSocket> for OwnedSocket {
372370

373371
#[stable(feature = "io_safety", since = "1.63.0")]
374372
impl From<OwnedSocket> for crate::net::UdpSocket {
375-
/// Make a `UdpSocket` from [`OwnedSocket`]s underlying socket.
376373
#[inline]
377374
fn from(owned: OwnedSocket) -> Self {
378375
unsafe { Self::from_raw_socket(owned.into_raw_socket()) }

0 commit comments

Comments
 (0)