Fix unused results from mem::replace

This commit is contained in:
Josh Stone 2020-04-17 13:59:14 -07:00
parent 7c4ca59f4b
commit ccecae5fdd
9 changed files with 14 additions and 14 deletions

View file

@ -4,7 +4,7 @@
pub fn main() {
use std::mem::replace;
let mut x = 5;
replace(&mut x, 6);
let _ = replace(&mut x, 6);
{
use std::mem::*;
let mut y = 6;

View file

@ -154,7 +154,7 @@ impl<'a> Drop for E<'a> {
};
if do_drop {
mem::replace(self, E::A(GaspA(f_a, 0xA3A0, log, D::new("drop", 6, log)), true));
let _ = mem::replace(self, E::A(GaspA(f_a, 0xA3A0, log, D::new("drop", 6, log)), true));
}
}
}