From 26f41435debc92e4b05275fb4e0f705dbb25bfdb Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Sat, 25 Sep 2021 12:23:54 -0700 Subject: [PATCH] chore: update to nightly-2021-09-22, fix clippy (#115) This just updates Rust to the latest nightly, and fixes a new Clippy lint on that nightly. --- rust-toolchain.toml | 2 +- util/src/io/impls.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 22cdba17..0d1cbdaa 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2021-06-05" +channel = "nightly-2021-09-22" components = [ "clippy", "rustfmt", diff --git a/util/src/io/impls.rs b/util/src/io/impls.rs index ad226ac2..7ade94a3 100644 --- a/util/src/io/impls.rs +++ b/util/src/io/impls.rs @@ -258,7 +258,7 @@ impl Write for &mut [u8] { #[inline] fn write(&mut self, data: &[u8]) -> io::Result { let amt = cmp::min(data.len(), self.len()); - let (a, b) = mem::replace(self, &mut []).split_at_mut(amt); + let (a, b) = mem::take(self).split_at_mut(amt); a.copy_from_slice(&data[..amt]); *self = b; Ok(amt)