Skip to content

Commit 2963dd5

Browse files
committed
Change error to panic in bytearray.clear
1 parent d5c91a8 commit 2963dd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm/src/obj/objbytearray.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,6 @@ fn bytearray_clear(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
275275
value.clear();
276276
Ok(vm.get_none())
277277
}
278-
_ => Err(vm.new_type_error("".to_string())),
278+
_ => panic!("Bytearray has incorrect payload."),
279279
}
280280
}

0 commit comments

Comments
 (0)