mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
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:
1 parent
4ad695dcfb
commit
de5b28809a
1 file changed
+2
-2
@@ -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("")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user