perf(span): add #[repr(transparent)] to Atom (#16310)

`Atom` is just a wrapper around a `&str`, so make it `#[repr(transparent)]`. This *may* help perf in some circumstances.
This commit is contained in:
overlookmotel committed 2025-12-01 02:30:34 +00:00
1 parent 43a6c3209e
commit ffca070d7a
1 file changed
+1
+1
View File
@@ -16,6 +16,7 @@ use crate::{CompactStr, ContentEq};
///
/// Use [CompactStr] with [Atom::to_compact_str] or [Atom::into_compact_str] for
/// the lifetimeless form.
#[repr(transparent)]
#[derive(Clone, Copy, Eq)]
pub struct Atom<'a>(&'a str);