Skip to content

Commit 63db6d7

Browse files
committed
rebased code
1 parent 8622e3c commit 63db6d7

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

derive/src/pyclass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ pub(crate) fn impl_define_exception(
338338
cls: PyTypeRef,
339339
args: FuncArgs,
340340
vm: &VirtualMachine,
341-
) -> PyResult<PyBaseExceptionRef> {
341+
) -> PyResult {
342342
#tp_new_slot
343343
}
344344

vm/src/exceptions.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,8 @@ impl PyBaseException {
155155
}
156156
}
157157

158-
fn base_exception_new(
159-
cls: PyTypeRef,
160-
args: FuncArgs,
161-
vm: &VirtualMachine,
162-
) -> PyResult<PyRef<PyBaseException>> {
163-
PyBaseException::new(args.args, vm).into_ref_with_type(vm, cls)
158+
fn base_exception_new(cls: PyTypeRef, args: FuncArgs, vm: &VirtualMachine) -> PyResult {
159+
PyBaseException::tp_new(cls, args, vm)
164160
}
165161

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

0 commit comments

Comments
 (0)