refactor(span): rename Atom::new_const method (#8480)

#8479 introduced `Atom::r#static` method. Rename it to
`Atom::new_const`, to match `CompactStr::new_const` which does the same
thing.
This commit is contained in:
overlookmotel authored and GitHub committed 2025-01-14 17:16:32 +08:00
1 parent 4ad695dcfb
commit de5b28809a
1 file changed
+2 -2
+2 -2
View File
@@ -22,14 +22,14 @@ pub struct Atom<'a>(&'a str);
impl Atom<'static> {
/// Get an [`Atom`] containing a static string.
#[inline]
pub const fn r#static(s: &'static str) -> Self {
pub const fn new_const(s: &'static str) -> Self {
Atom(s)
}
/// Get an [`Atom`] containing the empty string (`""`).
#[inline]
pub const fn empty() -> Self {
Self::r#static("")
Self::new_const("")
}
}