forked from Rust-related/RustPython
Fix clippy failure on Rust 1.42.0
This commit is contained in:
@@ -32,6 +32,7 @@ pub mod mode;
|
||||
pub mod parser;
|
||||
lalrpop_mod!(
|
||||
#[allow(clippy::all)]
|
||||
#[allow(unused)]
|
||||
python
|
||||
);
|
||||
pub mod token;
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user