mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
@@ -273,7 +273,7 @@ union UnTypedAbiValue {
|
||||
}
|
||||
|
||||
impl UnTypedAbiValue {
|
||||
unsafe fn to_typed(&self, ty: &JitType) -> AbiValue {
|
||||
unsafe fn to_typed(self, ty: &JitType) -> AbiValue {
|
||||
match ty {
|
||||
JitType::Int => AbiValue::Int(self.int),
|
||||
JitType::Float => AbiValue::Float(self.float),
|
||||
|
||||
@@ -132,7 +132,7 @@ impl PyList {
|
||||
|
||||
#[pymethod]
|
||||
fn clear(&self) {
|
||||
let _removed = std::mem::replace(self.borrow_vec_mut().deref_mut(), Vec::new());
|
||||
let _removed = std::mem::take(self.borrow_vec_mut().deref_mut());
|
||||
}
|
||||
|
||||
#[pymethod]
|
||||
|
||||
@@ -304,7 +304,7 @@ impl<T: Clone> Dict<T> {
|
||||
inner.used = 0;
|
||||
inner.filled = 0;
|
||||
// defer dec rc
|
||||
std::mem::replace(&mut inner.entries, Vec::new())
|
||||
std::mem::take(&mut inner.entries)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user