Skip to content

Commit

Permalink
Fix clippy failure on Rust 1.42.0
Browse files Browse the repository at this point in the history
  • Loading branch information
coolreader18 committed Mar 12, 2020
1 parent 2e06e16 commit 3d07a73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions parser/src/lib.rs
Expand Up @@ -32,6 +32,7 @@ pub mod mode;
pub mod parser;
lalrpop_mod!(
#[allow(clippy::all)]
#[allow(unused)]
python
);
pub mod token;
2 changes: 1 addition & 1 deletion vm/src/function.rs
Expand Up @@ -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))
}
}

Expand Down
4 changes: 2 additions & 2 deletions vm/src/stdlib/itertools.rs
Expand Up @@ -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) {
Expand Down

0 comments on commit 3d07a73

Please sign in to comment.