@@ -518,7 +518,7 @@ fn str_isupper(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
518518 && value
519519 . chars ( )
520520 . filter ( |x| !x. is_ascii_whitespace ( ) )
521- . all ( |c| c . is_uppercase ( ) ) ,
521+ . all ( char :: is_uppercase) ,
522522 ) )
523523}
524524
@@ -530,7 +530,7 @@ fn str_islower(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
530530 && value
531531 . chars ( )
532532 . filter ( |x| !x. is_ascii_whitespace ( ) )
533- . all ( |c| c . is_lowercase ( ) ) ,
533+ . all ( char :: is_lowercase) ,
534534 ) )
535535}
536536
@@ -895,7 +895,7 @@ fn str_isalnum(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
895895 let value = get_value ( & s) ;
896896 Ok ( vm
897897 . 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) ) )
899899}
900900
901901fn str_isascii ( vm : & mut VirtualMachine , args : PyFuncArgs ) -> PyResult {
@@ -959,15 +959,15 @@ fn str_isnumeric(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
959959 let value = get_value ( & s) ;
960960 Ok ( vm
961961 . 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) ) )
963963}
964964
965965fn str_isalpha ( vm : & mut VirtualMachine , args : PyFuncArgs ) -> PyResult {
966966 arg_check ! ( vm, args, required = [ ( s, Some ( vm. ctx. str_type( ) ) ) ] ) ;
967967 let value = get_value ( & s) ;
968968 Ok ( vm
969969 . 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) ) )
971971}
972972
973973fn str_isdigit ( vm : & mut VirtualMachine , args : PyFuncArgs ) -> PyResult {
0 commit comments