Skip to content

Commit

Permalink
add repr transparent to Pointer (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmello authored Jun 30, 2024
1 parent 1f9853e commit c415881
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ use core::{borrow::Borrow, cmp::Ordering, fmt, ops::Deref, slice, str::FromStr};
/// assert_eq!(bar, "baz");
/// ```
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
// See https://doc.rust-lang.org/src/std/path.rs.html#1985
#[cfg_attr(not(doc), repr(transparent))]
pub struct Pointer(str);

impl Default for &'static Pointer {
Expand Down

0 comments on commit c415881

Please sign in to comment.