Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dylni committed Nov 18, 2023
1 parent 3993a3d commit 1c5aeb8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
8 changes: 1 addition & 7 deletions src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ pub trait OsStrBytesExt: OsStrBytes {
/// assert_eq!("bar", os_string.index(3..));
/// ```
///
/// [`Index::index`]: std::ops::Index::index
/// [`Index::index`]: ::std::ops::Index::index
/// [valid boundary]: #indices
#[must_use]
#[track_caller]
Expand Down Expand Up @@ -826,12 +826,6 @@ r#impl!(RangeToInclusive<usize>, x, x.end.wrapping_add(1));
/// A container for platform strings containing no unicode characters.
///
/// Instances can only be constructed using [`Utf8Chunks`].
///
/// # Safety
///
/// Although this type is annotated with `#[repr(transparent)]`, the inner
/// representation is not stable. Transmuting between this type and any other
/// causes immediate undefined behavior.
#[derive(Debug)]
#[cfg_attr(os_str_bytes_docs_rs, doc(cfg(feature = "raw_os_str")))]
#[repr(transparent)]
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
//! used by this crate is an implementation detail, so it does not make sense
//! to expose it to users.
//!
//! For user input with an unknown encoding that is similar to UTF-8, use the
//! following IO-safe methods, which avoid errors when [writing to streams on
//! For user input with an unknown encoding similar to UTF-8, use the following
//! IO-safe methods, which avoid errors when [writing to streams on
//! Windows][windows_considerations]. These methods will not accept or return
//! byte sequences that are invalid for input and output streams. Therefore,
//! they can be used to convert between bytes strings exposed to users and
Expand Down
1 change: 0 additions & 1 deletion src/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ impl Encoded for &str {
///
/// [`RawOsStr`]: super::RawOsStr
/// [`RawOsString`]: super::RawOsString
/// [`str::pattern::Pattern`]: ::std::str::pattern::Pattern
#[cfg_attr(os_str_bytes_docs_rs, doc(cfg(feature = "raw_os_str")))]
pub trait Pattern: private::Sealed {
#[doc(hidden)]
Expand Down
8 changes: 1 addition & 7 deletions src/raw_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use std::str;

use super::ext;
use super::ext::SliceIndex;
use super::iter::RawSplit;
use super::iter::RawRSplit;
use super::iter::RawSplit;
use super::iter::Utf8Chunks;
use super::private;
use super::OsStrBytesExt;
Expand Down Expand Up @@ -50,12 +50,6 @@ unsafe impl TransmuteBox for [u8] {}
/// A container providing additional functionality for [`OsStr`].
///
/// For more information, see [`OsStrBytesExt`].
///
/// # Safety
///
/// Although this type is annotated with `#[repr(transparent)]`, the inner
/// representation is not stable. Transmuting between this type and any other
/// causes immediate undefined behavior.
#[derive(Eq, Hash, Ord, PartialEq, PartialOrd)]
#[cfg_attr(os_str_bytes_docs_rs, doc(cfg(feature = "raw_os_str")))]
#[repr(transparent)]
Expand Down

0 comments on commit 1c5aeb8

Please sign in to comment.