Fix unused results from mem::replace
This commit is contained in:
parent
7c4ca59f4b
commit
ccecae5fdd
9 changed files with 14 additions and 14 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue