@@ -518,7 +518,7 @@ fn str_isupper(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
518
518
&& value
519
519
. chars ( )
520
520
. filter ( |x| !x. is_ascii_whitespace ( ) )
521
- . all ( |c| c . is_uppercase ( ) ) ,
521
+ . all ( char :: is_uppercase) ,
522
522
) )
523
523
}
524
524
@@ -530,7 +530,7 @@ fn str_islower(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
530
530
&& value
531
531
. chars ( )
532
532
. filter ( |x| !x. is_ascii_whitespace ( ) )
533
- . all ( |c| c . is_lowercase ( ) ) ,
533
+ . all ( char :: is_lowercase) ,
534
534
) )
535
535
}
536
536
@@ -895,7 +895,7 @@ fn str_isalnum(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
895
895
let value = get_value ( & s) ;
896
896
Ok ( vm
897
897
. ctx
898
- . new_bool ( !value. is_empty ( ) && value. chars ( ) . all ( |c| c . is_alphanumeric ( ) ) ) )
898
+ . new_bool ( !value. is_empty ( ) && value. chars ( ) . all ( char :: is_alphanumeric) ) )
899
899
}
900
900
901
901
fn str_isascii ( vm : & mut VirtualMachine , args : PyFuncArgs ) -> PyResult {
@@ -959,15 +959,15 @@ fn str_isnumeric(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
959
959
let value = get_value ( & s) ;
960
960
Ok ( vm
961
961
. ctx
962
- . new_bool ( !value. is_empty ( ) && value. chars ( ) . all ( |c| c . is_numeric ( ) ) ) )
962
+ . new_bool ( !value. is_empty ( ) && value. chars ( ) . all ( char :: is_numeric) ) )
963
963
}
964
964
965
965
fn str_isalpha ( vm : & mut VirtualMachine , args : PyFuncArgs ) -> PyResult {
966
966
arg_check ! ( vm, args, required = [ ( s, Some ( vm. ctx. str_type( ) ) ) ] ) ;
967
967
let value = get_value ( & s) ;
968
968
Ok ( vm
969
969
. ctx
970
- . new_bool ( !value. is_empty ( ) && value. chars ( ) . all ( |c| c . is_alphanumeric ( ) ) ) )
970
+ . new_bool ( !value. is_empty ( ) && value. chars ( ) . all ( char :: is_alphanumeric) ) )
971
971
}
972
972
973
973
fn str_isdigit ( vm : & mut VirtualMachine , args : PyFuncArgs ) -> PyResult {
0 commit comments