1- use std:: { borrow:: Cow , collections :: HashSet , sync :: LazyLock } ;
1+ use std:: borrow:: Cow ;
22
33use ruby_prism as prism;
44
@@ -1632,18 +1632,11 @@ fn format_block_argument_node<'src>(
16321632 }
16331633}
16341634
1635- pub static RSPEC_METHODS : LazyLock < HashSet < & ' static str > > =
1636- LazyLock :: new ( || vec ! [ "it" , "describe" ] . into_iter ( ) . collect ( ) ) ;
1635+ pub static RSPEC_METHODS : [ & str ; 2 ] = [ "it" , "describe" ] ;
16371636
1638- pub static GEMFILE_METHODS : LazyLock < HashSet < & ' static str > > =
1639- LazyLock :: new ( || vec ! [ "gem" , "source" , "ruby" , "group" ] . into_iter ( ) . collect ( ) ) ;
1637+ pub static GEMFILE_METHODS : [ & str ; 4 ] = [ "gem" , "source" , "ruby" , "group" ] ;
16401638
1641- pub static OPTIONALLY_PARENTHESIZED_METHODS : LazyLock < HashSet < & ' static str > > =
1642- LazyLock :: new ( || {
1643- vec ! [ "super" , "require" , "require_relative" ]
1644- . into_iter ( )
1645- . collect :: < HashSet < _ > > ( )
1646- } ) ;
1639+ pub static OPTIONALLY_PARENTHESIZED_METHODS : [ & str ; 3 ] = [ "super" , "require" , "require_relative" ] ;
16471640
16481641fn use_parens_for_call_node < ' src > (
16491642 ps : & ParserState < ' src > ,
@@ -1712,8 +1705,8 @@ fn use_parens_for_call_node<'src>(
17121705 return false ;
17131706 }
17141707
1715- if OPTIONALLY_PARENTHESIZED_METHODS . contains ( method_name)
1716- || GEMFILE_METHODS . contains ( method_name)
1708+ if OPTIONALLY_PARENTHESIZED_METHODS . contains ( & method_name)
1709+ || GEMFILE_METHODS . contains ( & method_name)
17171710 {
17181711 return original_used_parens;
17191712 }
@@ -1733,7 +1726,7 @@ fn use_parens_for_call_node<'src>(
17331726 return true ;
17341727 }
17351728
1736- if RSPEC_METHODS . contains ( method_name)
1729+ if RSPEC_METHODS . contains ( & method_name)
17371730 && call_node. receiver ( ) . is_none ( )
17381731 // Only elide parens for blocks, not block params (`&blk`)
17391732 && call_node
0 commit comments