File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ lint_identifier_non_ascii_char = identifier contains non-ASCII characters
242242
243243lint_identifier_uncommon_codepoints = identifier contains { $codepoints_len ->
244244 [ one ] { $identifier_type ->
245- [ Exclusion ] a Unicode codepoint that its corresponding script is no longer used
245+ [ Exclusion ] a Unicode codepoint whose corresponding script is no longer used
246246 [ Technical ] a Unicode codepoint that has specialized usage
247247 [ Limited_Use ] a Unicode codepoint that is in limited use
248248 [ Not_NFKC ] a Unicode codepoint that is not used in normalized strings
Original file line number Diff line number Diff line change @@ -221,14 +221,12 @@ impl EarlyLintPass for NonAsciiIdents {
221221 . extract_if ( |( c, _) | !GeneralSecurityProfile :: identifier_allowed ( * c) )
222222 . collect :: < Vec < _ > > ( ) ;
223223 if !remaining. is_empty ( ) {
224- let remaining_len = remaining. len ( ) ;
225-
226224 cx. emit_span_lint (
227225 UNCOMMON_CODEPOINTS ,
228226 sp,
229227 IdentifierUncommonCodepoints {
230- codepoints : remaining. iter ( ) . map ( | ( c , _ ) | * c ) . collect ( ) ,
231- codepoints_len : remaining_len ,
228+ codepoints_len : remaining. len ( ) ,
229+ codepoints : remaining . into_iter ( ) . map ( | ( c , _ ) | c ) . collect ( ) ,
232230 identifier_type : "Restricted" ,
233231 } ,
234232 ) ;
You can’t perform that action at this time.
0 commit comments