Merge pull request #2717 from DimitrisJim/quiet_clippy

Please clippy.
This commit is contained in:
Noah
2021-06-20 19:12:18 -04:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -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),

View File

@@ -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]

View File

@@ -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)
};
}