Skip to content

Commit 3d07a73

Browse files
committed
Fix clippy failure on Rust 1.42.0
1 parent 2e06e16 commit 3d07a73

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

parser/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub mod mode;
3232
pub mod parser;
3333
lalrpop_mod!(
3434
#[allow(clippy::all)]
35+
#[allow(unused)]
3536
python
3637
);
3738
pub mod token;

vm/src/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl From<(&Args, &KwArgs)> for PyFuncArgs {
6767

6868
impl FromArgs for PyFuncArgs {
6969
fn from_args(_vm: &VirtualMachine, args: &mut PyFuncArgs) -> Result<Self, ArgumentError> {
70-
Ok(mem::replace(args, Default::default()))
70+
Ok(mem::take(args))
7171
}
7272
}
7373

vm/src/stdlib/itertools.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,8 +906,8 @@ impl PyItertoolsProduct {
906906
}
907907

908908
fn is_end(&self) -> bool {
909-
(self.idxs.borrow()[self.cur.get()] == &self.pools[self.cur.get()].len() - 1
910-
&& self.cur.get() == 0)
909+
let cur = self.cur.get();
910+
self.idxs.borrow()[cur] == self.pools[cur].len() - 1 && cur == 0
911911
}
912912

913913
fn update_idxs(&self) {

0 commit comments

Comments
 (0)