@@ -1169,7 +1169,7 @@ mod test {
1169
1169
}
1170
1170
for c in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" . chars ( ) {
1171
1171
let options = MatchOptions { case_sensitive : false , ..MatchOptions :: new ( ) } ;
1172
- assert ! ( pat. matches_with( & c. to_string( ) , & options) ) ;
1172
+ assert ! ( pat. matches_with( & c. to_string( ) , options) ) ;
1173
1173
}
1174
1174
assert ! ( pat. matches( "1" ) ) ;
1175
1175
assert ! ( pat. matches( "2" ) ) ;
@@ -1229,10 +1229,10 @@ mod test {
1229
1229
require_literal_leading_dot : false ,
1230
1230
} ;
1231
1231
1232
- assert ! ( pat. matches_with( "aBcDeFg" , & options) ) ;
1233
- assert ! ( pat. matches_with( "abcdefg" , & options) ) ;
1234
- assert ! ( pat. matches_with( "ABCDEFG" , & options) ) ;
1235
- assert ! ( pat. matches_with( "AbCdEfG" , & options) ) ;
1232
+ assert ! ( pat. matches_with( "aBcDeFg" , options) ) ;
1233
+ assert ! ( pat. matches_with( "abcdefg" , options) ) ;
1234
+ assert ! ( pat. matches_with( "ABCDEFG" , options) ) ;
1235
+ assert ! ( pat. matches_with( "AbCdEfG" , options) ) ;
1236
1236
}
1237
1237
1238
1238
#[ test]
@@ -1252,13 +1252,13 @@ mod test {
1252
1252
require_literal_leading_dot : false ,
1253
1253
} ;
1254
1254
1255
- assert ! ( pat_within. matches_with( "a" , & options_case_insensitive) ) ;
1256
- assert ! ( pat_within. matches_with( "A" , & options_case_insensitive) ) ;
1257
- assert ! ( !pat_within. matches_with( "A" , & options_case_sensitive) ) ;
1255
+ assert ! ( pat_within. matches_with( "a" , options_case_insensitive) ) ;
1256
+ assert ! ( pat_within. matches_with( "A" , options_case_insensitive) ) ;
1257
+ assert ! ( !pat_within. matches_with( "A" , options_case_sensitive) ) ;
1258
1258
1259
- assert ! ( !pat_except. matches_with( "a" , & options_case_insensitive) ) ;
1260
- assert ! ( !pat_except. matches_with( "A" , & options_case_insensitive) ) ;
1261
- assert ! ( pat_except. matches_with( "A" , & options_case_sensitive) ) ;
1259
+ assert ! ( !pat_except. matches_with( "a" , options_case_insensitive) ) ;
1260
+ assert ! ( !pat_except. matches_with( "A" , options_case_insensitive) ) ;
1261
+ assert ! ( pat_except. matches_with( "A" , options_case_sensitive) ) ;
1262
1262
}
1263
1263
1264
1264
#[ test]
@@ -1275,29 +1275,29 @@ mod test {
1275
1275
require_literal_leading_dot : false ,
1276
1276
} ;
1277
1277
1278
- assert ! ( Pattern :: new( "abc/def" ) . unwrap( ) . matches_with( "abc/def" , & options_require_literal) ) ;
1278
+ assert ! ( Pattern :: new( "abc/def" ) . unwrap( ) . matches_with( "abc/def" , options_require_literal) ) ;
1279
1279
assert ! ( !Pattern :: new( "abc?def" )
1280
1280
. unwrap( )
1281
- . matches_with( "abc/def" , & options_require_literal) ) ;
1281
+ . matches_with( "abc/def" , options_require_literal) ) ;
1282
1282
assert ! ( !Pattern :: new( "abc*def" )
1283
1283
. unwrap( )
1284
- . matches_with( "abc/def" , & options_require_literal) ) ;
1284
+ . matches_with( "abc/def" , options_require_literal) ) ;
1285
1285
assert ! ( !Pattern :: new( "abc[/]def" )
1286
1286
. unwrap( )
1287
- . matches_with( "abc/def" , & options_require_literal) ) ;
1287
+ . matches_with( "abc/def" , options_require_literal) ) ;
1288
1288
1289
1289
assert ! ( Pattern :: new( "abc/def" )
1290
1290
. unwrap( )
1291
- . matches_with( "abc/def" , & options_not_require_literal) ) ;
1291
+ . matches_with( "abc/def" , options_not_require_literal) ) ;
1292
1292
assert ! ( Pattern :: new( "abc?def" )
1293
1293
. unwrap( )
1294
- . matches_with( "abc/def" , & options_not_require_literal) ) ;
1294
+ . matches_with( "abc/def" , options_not_require_literal) ) ;
1295
1295
assert ! ( Pattern :: new( "abc*def" )
1296
1296
. unwrap( )
1297
- . matches_with( "abc/def" , & options_not_require_literal) ) ;
1297
+ . matches_with( "abc/def" , options_not_require_literal) ) ;
1298
1298
assert ! ( Pattern :: new( "abc[/]def" )
1299
1299
. unwrap( )
1300
- . matches_with( "abc/def" , & options_not_require_literal) ) ;
1300
+ . matches_with( "abc/def" , options_not_require_literal) ) ;
1301
1301
}
1302
1302
1303
1303
#[ test]
@@ -1315,38 +1315,38 @@ mod test {
1315
1315
} ;
1316
1316
1317
1317
let f = |options| Pattern :: new ( "*.txt" ) . unwrap ( ) . matches_with ( ".hello.txt" , options) ;
1318
- assert ! ( f( & options_not_require_literal_leading_dot) ) ;
1319
- assert ! ( !f( & options_require_literal_leading_dot) ) ;
1318
+ assert ! ( f( options_not_require_literal_leading_dot) ) ;
1319
+ assert ! ( !f( options_require_literal_leading_dot) ) ;
1320
1320
1321
1321
let f = |options| Pattern :: new ( ".*.*" ) . unwrap ( ) . matches_with ( ".hello.txt" , options) ;
1322
- assert ! ( f( & options_not_require_literal_leading_dot) ) ;
1323
- assert ! ( f( & options_require_literal_leading_dot) ) ;
1322
+ assert ! ( f( options_not_require_literal_leading_dot) ) ;
1323
+ assert ! ( f( options_require_literal_leading_dot) ) ;
1324
1324
1325
1325
let f = |options| Pattern :: new ( "aaa/bbb/*" ) . unwrap ( ) . matches_with ( "aaa/bbb/.ccc" , options) ;
1326
- assert ! ( f( & options_not_require_literal_leading_dot) ) ;
1327
- assert ! ( !f( & options_require_literal_leading_dot) ) ;
1326
+ assert ! ( f( options_not_require_literal_leading_dot) ) ;
1327
+ assert ! ( !f( options_require_literal_leading_dot) ) ;
1328
1328
1329
1329
let f = |options| {
1330
1330
Pattern :: new ( "aaa/bbb/*" ) . unwrap ( ) . matches_with ( "aaa/bbb/c.c.c." , options)
1331
1331
} ;
1332
- assert ! ( f( & options_not_require_literal_leading_dot) ) ;
1333
- assert ! ( f( & options_require_literal_leading_dot) ) ;
1332
+ assert ! ( f( options_not_require_literal_leading_dot) ) ;
1333
+ assert ! ( f( options_require_literal_leading_dot) ) ;
1334
1334
1335
1335
let f = |options| Pattern :: new ( "aaa/bbb/.*" ) . unwrap ( ) . matches_with ( "aaa/bbb/.ccc" , options) ;
1336
- assert ! ( f( & options_not_require_literal_leading_dot) ) ;
1337
- assert ! ( f( & options_require_literal_leading_dot) ) ;
1336
+ assert ! ( f( options_not_require_literal_leading_dot) ) ;
1337
+ assert ! ( f( options_require_literal_leading_dot) ) ;
1338
1338
1339
1339
let f = |options| Pattern :: new ( "aaa/?bbb" ) . unwrap ( ) . matches_with ( "aaa/.bbb" , options) ;
1340
- assert ! ( f( & options_not_require_literal_leading_dot) ) ;
1341
- assert ! ( !f( & options_require_literal_leading_dot) ) ;
1340
+ assert ! ( f( options_not_require_literal_leading_dot) ) ;
1341
+ assert ! ( !f( options_require_literal_leading_dot) ) ;
1342
1342
1343
1343
let f = |options| Pattern :: new ( "aaa/[.]bbb" ) . unwrap ( ) . matches_with ( "aaa/.bbb" , options) ;
1344
- assert ! ( f( & options_not_require_literal_leading_dot) ) ;
1345
- assert ! ( !f( & options_require_literal_leading_dot) ) ;
1344
+ assert ! ( f( options_not_require_literal_leading_dot) ) ;
1345
+ assert ! ( !f( options_require_literal_leading_dot) ) ;
1346
1346
1347
1347
let f = |options| Pattern :: new ( "**/*" ) . unwrap ( ) . matches_with ( ".bbb" , options) ;
1348
- assert ! ( f( & options_not_require_literal_leading_dot) ) ;
1349
- assert ! ( !f( & options_require_literal_leading_dot) ) ;
1348
+ assert ! ( f( options_not_require_literal_leading_dot) ) ;
1349
+ assert ! ( !f( options_require_literal_leading_dot) ) ;
1350
1350
}
1351
1351
1352
1352
#[ test]
0 commit comments