@@ -195,7 +195,7 @@ impl<'a> LiteralStringNormalizer<'a> {
195195 Self { token, chosen_quote_style, chosen_quote_properties }
196196 }
197197
198- fn normalize_text ( & mut self , source_type : SourceType ) -> Cow < ' a , str > {
198+ fn normalize_text ( & self , source_type : SourceType ) -> Cow < ' a , str > {
199199 let str_info = self . token . compute_string_information ( self . chosen_quote_style ) ;
200200 match self . token . parent_kind {
201201 StringLiteralParentKind :: Expression => self . normalize_string_literal ( str_info) ,
@@ -205,10 +205,7 @@ impl<'a> LiteralStringNormalizer<'a> {
205205 }
206206 }
207207
208- fn normalize_import_attribute (
209- & mut self ,
210- string_information : StringInformation ,
211- ) -> Cow < ' a , str > {
208+ fn normalize_import_attribute ( & self , string_information : StringInformation ) -> Cow < ' a , str > {
212209 let quoteless = self . raw_content ( ) ;
213210 let can_remove_quotes =
214211 !self . is_preserve_quote_properties ( ) && is_identifier_name ( quoteless) ;
@@ -219,7 +216,7 @@ impl<'a> LiteralStringNormalizer<'a> {
219216 }
220217 }
221218
222- fn normalize_directive ( & mut self , string_information : StringInformation ) -> Cow < ' a , str > {
219+ fn normalize_directive ( & self , string_information : StringInformation ) -> Cow < ' a , str > {
223220 // In diretcives, unnecessary escapes should be preserved.
224221 // See https://github.com/prettier/prettier/issues/1555
225222 // Thus we don't normalize the string.
@@ -261,7 +258,7 @@ impl<'a> LiteralStringNormalizer<'a> {
261258 }
262259
263260 fn normalize_type_member (
264- & mut self ,
261+ & self ,
265262 string_information : StringInformation ,
266263 source_type : SourceType ,
267264 ) -> Cow < ' a , str > {
0 commit comments