We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89889ac commit 28bda1dCopy full SHA for 28bda1d
crates/vm/src/stdlib/ctypes/array.rs
@@ -798,9 +798,10 @@ impl PyCArray {
798
} else if let Ok(int_val) = value.try_index(vm) {
799
(int_val.as_bigint().to_usize().unwrap_or(0), None)
800
} else {
801
- return Err(
802
- vm.new_type_error("bytes or integer address expected instead of {}")
803
- );
+ return Err(vm.new_type_error(format!(
+ "bytes or integer address expected instead of {} instance",
+ value.class().name()
804
+ )));
805
};
806
if offset + element_size <= buffer.len() {
807
buffer[offset..offset + element_size].copy_from_slice(&ptr_val.to_ne_bytes());
0 commit comments