Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
run cargo fmt
  • Loading branch information
Snowapril committed May 19, 2024
commit d679165cd7cab7558196c54cea55ee1c7f555de9
8 changes: 3 additions & 5 deletions vm/src/builtins/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,6 @@ fn calculate_meta_class(
Ok(winner)
}


fn solid_base(typ: &PyTypeRef, vm: &VirtualMachine) -> PyTypeRef {
let base = if let Some(base) = &typ.base {
solid_base(base, vm)
Expand All @@ -1341,7 +1340,6 @@ fn solid_base(typ: &PyTypeRef, vm: &VirtualMachine) -> PyTypeRef {
}

fn best_base(bases: &[PyTypeRef], vm: &VirtualMachine) -> PyResult<PyTypeRef> {

let mut base: Option<PyTypeRef> = None;
let mut winner: Option<PyTypeRef> = None;

Expand All @@ -1368,9 +1366,9 @@ fn best_base(bases: &[PyTypeRef], vm: &VirtualMachine) -> PyResult<PyTypeRef> {
winner = Some(candidate.clone());
base = Some(base_i.clone());
} else {
return Err(vm.new_type_error(
"multiple bases have instance layout conflict".to_string(),
));
return Err(
vm.new_type_error("multiple bases have instance layout conflict".to_string())
);
}
}

Expand Down