Fix clippy failure on Rust 1.42.0

This commit is contained in:
Noah
2020-03-12 17:42:37 -05:00
parent 2e06e167d6
commit 3d07a73346
3 changed files with 4 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ pub mod mode;
pub mod parser;
lalrpop_mod!(
#[allow(clippy::all)]
#[allow(unused)]
python
);
pub mod token;

View File

@@ -67,7 +67,7 @@ impl From<(&Args, &KwArgs)> for PyFuncArgs {
impl FromArgs for PyFuncArgs {
fn from_args(_vm: &VirtualMachine, args: &mut PyFuncArgs) -> Result<Self, ArgumentError> {
Ok(mem::replace(args, Default::default()))
Ok(mem::take(args))
}
}

View File

@@ -906,8 +906,8 @@ impl PyItertoolsProduct {
}
fn is_end(&self) -> bool {
(self.idxs.borrow()[self.cur.get()] == &self.pools[self.cur.get()].len() - 1
&& self.cur.get() == 0)
let cur = self.cur.get();
self.idxs.borrow()[cur] == self.pools[cur].len() - 1 && cur == 0
}
fn update_idxs(&self) {