File tree 2 files changed +3
-5
lines changed
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
242
242
243
243
lint_identifier_uncommon_codepoints = identifier contains { $codepoints_len ->
244
244
[ 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
246
246
[ Technical ] a Unicode codepoint that has specialized usage
247
247
[ Limited_Use ] a Unicode codepoint that is in limited use
248
248
[ 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 {
221
221
. extract_if ( |( c, _) | !GeneralSecurityProfile :: identifier_allowed ( * c) )
222
222
. collect :: < Vec < _ > > ( ) ;
223
223
if !remaining. is_empty ( ) {
224
- let remaining_len = remaining. len ( ) ;
225
-
226
224
cx. emit_span_lint (
227
225
UNCOMMON_CODEPOINTS ,
228
226
sp,
229
227
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 ( ) ,
232
230
identifier_type : "Restricted" ,
233
231
} ,
234
232
) ;
You can’t perform that action at this time.
0 commit comments