From de5b28809ae3d3af49bdf9c55fa37b8766ddafa4 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Tue, 14 Jan 2025 09:16:32 +0000 Subject: [PATCH] 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. --- crates/oxc_span/src/atom.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_span/src/atom.rs b/crates/oxc_span/src/atom.rs index 896af0ca7..8896dbeb2 100644 --- a/crates/oxc_span/src/atom.rs +++ b/crates/oxc_span/src/atom.rs @@ -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("") } }