Skip to content

Commit 199448b

Browse files
Apply suggestions from code review
Co-authored-by: Jubilee <[email protected]>
1 parent 4cbfc84 commit 199448b

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

library/alloc/src/bstr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ impl From<Box<[u8]>> for Box<ByteStr> {
643643

644644
#[unstable(feature = "bstr", issue = "134915")]
645645
impl From<Box<ByteStr>> for Box<[u8]> {
646-
/// Create a `Box<ByteStr>` from `Box<[u8]>`s raw.
646+
/// Convert the inner bytes of `Box<[u8]>` to `ByteStr`.
647647
#[inline]
648648
fn from(s: Box<ByteStr>) -> Box<[u8]> {
649649
// SAFETY: `ByteStr` is a transparent wrapper around `[u8]`.
@@ -707,10 +707,10 @@ impl_partial_eq_ord_cow!(&'a ByteStr, Cow<'a, [u8]>);
707707
impl<'a> TryFrom<&'a ByteStr> for String {
708708
type Error = core::str::Utf8Error;
709709

710-
/// Convert `ByteStr`s bytes to a utf-8 `String`.
710+
/// Convert `ByteStr`s bytes to a UTF-8 `String`.
711711
///
712712
/// # Errors
713-
/// If `ByteStr` is not valid utf-8
713+
/// If `ByteStr` is not valid UTF-8
714714
#[inline]
715715
fn try_from(s: &'a ByteStr) -> Result<Self, Self::Error> {
716716
Ok(core::str::from_utf8(&s.0)?.into())

library/core/src/ptr/alignment.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl TryFrom<usize> for Alignment {
189189

190190
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
191191
impl From<Alignment> for NonZero<usize> {
192-
/// `Alignment` is non zero so the inner value is returned
192+
/// `Alignment` is non-zero so the inner value is returned
193193
#[inline]
194194
fn from(align: Alignment) -> NonZero<usize> {
195195
align.as_nonzero()
@@ -198,7 +198,7 @@ impl From<Alignment> for NonZero<usize> {
198198

199199
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
200200
impl From<Alignment> for usize {
201-
/// `Alignment` is unsigned so the inner value is returned
201+
/// Return the inner value of `Alignment`
202202
#[inline]
203203
fn from(align: Alignment) -> usize {
204204
align.as_usize()

library/core/src/ptr/non_null.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@ impl<T: ?Sized> hash::Hash for NonNull<T> {
16481648

16491649
#[unstable(feature = "ptr_internals", issue = "none")]
16501650
impl<T: ?Sized> From<Unique<T>> for NonNull<T> {
1651-
/// Return `Unique` casted to a `NonNull`.
1651+
/// Return `Unique` cast to a `NonNull`.
16521652
#[inline]
16531653
fn from(unique: Unique<T>) -> Self {
16541654
unique.as_non_null_ptr()

library/portable-simd/crates/core_simd/src/masks/full_masks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ where
238238
T: MaskElement,
239239
LaneCount<N>: SupportedLaneCount,
240240
{
241-
/// Return the inner of the `Mask`
241+
/// Return the `MaskElement` of the `Mask`
242242
#[inline]
243243
fn from(value: Mask<T, N>) -> Self {
244244
value.0

library/portable-simd/crates/core_simd/src/vector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ where
10471047
LaneCount<N>: SupportedLaneCount,
10481048
T: SimdElement,
10491049
{
1050-
/// Use `from_array` to load the array into a new `Simd`
1050+
/// Load the array into a new `Simd`
10511051
#[inline]
10521052
fn from(array: [T; N]) -> Self {
10531053
Self::from_array(array)

0 commit comments

Comments
 (0)