mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-17 01:51:39 +09:00
Remove PyObjectPayload
This commit is contained in:
@@ -3,8 +3,7 @@ use super::objint;
|
||||
use super::objstr;
|
||||
use super::objtype;
|
||||
use crate::pyobject::{
|
||||
IntoPyObject, PyContext, PyObject, PyObjectPayload, PyObjectPayload2, PyObjectRef, PyRef,
|
||||
PyResult, TypeProtocol,
|
||||
IntoPyObject, PyContext, PyObject, PyObjectPayload2, PyObjectRef, PyRef, PyResult, TypeProtocol,
|
||||
};
|
||||
use crate::vm::VirtualMachine;
|
||||
use num_bigint::ToBigInt;
|
||||
@@ -189,12 +188,7 @@ impl PyFloatRef {
|
||||
let type_name = objtype::get_type_name(&arg.typ());
|
||||
return Err(vm.new_type_error(format!("can't convert {} to float", type_name)));
|
||||
};
|
||||
Ok(PyObject::new(
|
||||
PyObjectPayload::AnyRustValue {
|
||||
value: Box::new(PyFloat { value }),
|
||||
},
|
||||
cls.clone(),
|
||||
))
|
||||
Ok(PyObject::new(Box::new(PyFloat { value }), cls.clone()))
|
||||
}
|
||||
|
||||
fn mod_(self, other: PyObjectRef, vm: &mut VirtualMachine) -> PyResult {
|
||||
|
||||
Reference in New Issue
Block a user