Fix clippy lints

This commit is contained in:
coolreader18
2019-09-25 19:21:55 -05:00
parent c46b5b50bd
commit b581975ef6
2 changed files with 2 additions and 1 deletions

View File

@@ -281,7 +281,7 @@ fn type_new_slot(metatype: PyClassRef, args: PyFuncArgs, vm: &VirtualMachine) ->
vm_trace!("type.__new__ {:?}", args);
if metatype.is(&vm.ctx.types.type_type) {
if args.args.len() == 1 && args.kwargs.len() == 0 {
if args.args.len() == 1 && args.kwargs.is_empty() {
return Ok(args.args[0].class().into_object());
}
if args.args.len() != 3 {

View File

@@ -637,6 +637,7 @@ fn ast_parse(source: PyStringRef, vm: &VirtualMachine) -> PyResult<AstNodeRef> {
program_to_ast(&vm, &internal_ast)
}
#[allow(clippy::cognitive_complexity)]
pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
let ctx = &vm.ctx;