Skip to content

Commit eb94067

Browse files
committed
replace -> take
1 parent 20b4986 commit eb94067

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

capnp/src/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ mod no_std_impls {
101101
return Err(Error::failed("buffer is not large enough".to_string()));
102102
}
103103
let amt = buf.len();
104-
let (a, b) = core::mem::replace(self, &mut []).split_at_mut(amt);
104+
let (a, b) = core::mem::take(self).split_at_mut(amt);
105105
a.copy_from_slice(buf);
106106
*self = b;
107107
Ok(())

0 commit comments

Comments
 (0)