From c41588163b1c0b7a66a26d2cddb5aae41bc9e1fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Mello?= <3285133+asmello@users.noreply.github.com> Date: Sun, 30 Jun 2024 17:55:27 +0100 Subject: [PATCH] add repr transparent to `Pointer` (#49) --- src/pointer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pointer.rs b/src/pointer.rs index 1775b23..107c3d5 100644 --- a/src/pointer.rs +++ b/src/pointer.rs @@ -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 {