Skip to content

Commit

Permalink
Allow unused static strings
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Sep 28, 2023
1 parent d807a8f commit 338dcc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boa_engine/src/string/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ macro_rules! well_known_statics {
$(
paste!{
#[doc = "Gets the static `JsString` for `\"" $string "\"`."]
#[allow(unused)]
pub(crate) const $name: JsString = JsString {
ptr: Tagged::from_tag(
Self::find_index(utf16!($string)),
Expand Down Expand Up @@ -76,6 +77,7 @@ impl StaticJsStrings {
RAW_STATICS.get(index).copied()
}

// Some consts are only used on certain features, which triggers the unused lint.
well_known_statics! {
(EMPTY_STRING, ""),
// Symbols
Expand Down

0 comments on commit 338dcc0

Please sign in to comment.