Skip to content
Prev Previous commit
rebased code
  • Loading branch information
sobolevn committed Sep 15, 2021
commit 63db6d78b429e416b837d173495de5c51e454423
2 changes: 1 addition & 1 deletion derive/src/pyclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ pub(crate) fn impl_define_exception(
cls: PyTypeRef,
args: FuncArgs,
vm: &VirtualMachine,
) -> PyResult<PyBaseExceptionRef> {
) -> PyResult {
#tp_new_slot
}

Expand Down
8 changes: 2 additions & 6 deletions vm/src/exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,8 @@ impl PyBaseException {
}
}

fn base_exception_new(
cls: PyTypeRef,
args: FuncArgs,
vm: &VirtualMachine,
) -> PyResult<PyRef<PyBaseException>> {
PyBaseException::new(args.args, vm).into_ref_with_type(vm, cls)
fn base_exception_new(cls: PyTypeRef, args: FuncArgs, vm: &VirtualMachine) -> PyResult {
PyBaseException::tp_new(cls, args, vm)
}

pub fn chain<T>(e1: PyResult<()>, e2: PyResult<T>) -> PyResult<T> {
Expand Down