@@ -201,7 +201,7 @@ mod test {
201
201
assert ! (
202
202
are_all_variants_valid(
203
203
SYM ,
204
- |c| !c. ends_with ( EMOJI_PRESENTATION_SELECTOR ) ,
204
+ |c| !c. contains ( EMOJI_PRESENTATION_SELECTOR ) ,
205
205
) ,
206
206
"unexpected use of emoji presentation selector (U+FE0F) in `sym` (see list above)" ,
207
207
)
@@ -212,7 +212,7 @@ mod test {
212
212
assert ! (
213
213
are_all_variants_valid(
214
214
EMOJI ,
215
- |c| !c. ends_with ( TEXT_PRESENTATION_SELECTOR ) ,
215
+ |c| !c. contains ( TEXT_PRESENTATION_SELECTOR ) ,
216
216
) ,
217
217
"unexpected use of text presentation selector (U+FE0E) in `emoji` (see list above)" ,
218
218
)
@@ -248,8 +248,8 @@ mod test {
248
248
let sequences = get_valid_presentation_sequences ( ) ;
249
249
assert ! (
250
250
are_all_variants_valid( ROOT , |c| {
251
- if c. ends_with ( TEXT_PRESENTATION_SELECTOR )
252
- || c. ends_with ( EMOJI_PRESENTATION_SELECTOR )
251
+ if c. contains ( TEXT_PRESENTATION_SELECTOR )
252
+ || c. contains ( EMOJI_PRESENTATION_SELECTOR )
253
253
{
254
254
sequences. contains( c)
255
255
} else {
@@ -269,8 +269,8 @@ mod test {
269
269
. collect :: < HashSet < _ > > ( ) ;
270
270
assert ! (
271
271
are_all_variants_valid( SYM , |c| {
272
- c. chars( ) . count( ) ! = 1
273
- || ! require_presentation_selector. contains( & c. chars( ) . next( ) . unwrap( ) )
272
+ ! ( c. chars( ) . count( ) = = 1
273
+ && require_presentation_selector. contains( & c. chars( ) . next( ) . unwrap( ) ) )
274
274
} ) ,
275
275
"missing text presentation selector(s) (U+FE0E) in `sym` (see list above)" ,
276
276
)
@@ -285,8 +285,8 @@ mod test {
285
285
. collect :: < HashSet < _ > > ( ) ;
286
286
assert ! (
287
287
are_all_variants_valid( EMOJI , |c| {
288
- c. chars( ) . count( ) ! = 1
289
- || ! require_presentation_selector. contains( & c. chars( ) . next( ) . unwrap( ) )
288
+ ! ( c. chars( ) . count( ) = = 1
289
+ && require_presentation_selector. contains( & c. chars( ) . next( ) . unwrap( ) ) )
290
290
} ) ,
291
291
"missing emoji presentation selector(s) (U+FE0F) in `emoji` (see list above)" ,
292
292
)
0 commit comments