mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +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:
parent
4ad695dcfb
commit
de5b28809a
1 changed files with 2 additions and 2 deletions
|
|
@ -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("")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue