From 8c2a5647d144cce781fb907b29fa078039a3cdba Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 5 Jun 2024 14:33:08 -0700 Subject: [PATCH] rust-toolchain: update to Rust 1.77.2 This also upgrades the dev_container to package the new Rust version. A few final clippy fixes are included as well. BUG=b:344974550 TEST=tools/clippy Change-Id: Iab4253e9cd88fdae989bb5b5170040b6af85baca Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5609084 Reviewed-by: Dennis Kempin Commit-Queue: Daniel Verkamp --- devices/src/serial.rs | 2 +- devices/src/virtio/video/decoder/backend/vaapi.rs | 1 + e2e_tests/fixture/src/vm.rs | 2 +- ext2/tests/tests.rs | 4 ++-- rust-toolchain | 2 +- tools/impl/dev_container/version | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/devices/src/serial.rs b/devices/src/serial.rs index aef9eb6333..c1c3ea1cd9 100644 --- a/devices/src/serial.rs +++ b/devices/src/serial.rs @@ -251,7 +251,7 @@ impl Serial { Ok(0) => { return rx; } - Ok(_) => { + Ok(_n) => { if send_channel.send(rx_buf[0]).is_err() { // The receiver has disconnected. return rx; diff --git a/devices/src/virtio/video/decoder/backend/vaapi.rs b/devices/src/virtio/video/decoder/backend/vaapi.rs index 96920e5eda..17a296001a 100644 --- a/devices/src/virtio/video/decoder/backend/vaapi.rs +++ b/devices/src/virtio/video/decoder/backend/vaapi.rs @@ -491,6 +491,7 @@ impl<'a, T: AsBufferHandle> AsMut<[u8]> for BufferMapping<'a, T> { /// decoded and is waiting for us to release it (`Decoded`), or because we temporarily removed it /// from the decoder pool after a reset and are waiting for the client to tell us we can use it /// (`Held`). +#[allow(dead_code)] // TODO: b/344974550 enum BorrowedFrame { Decoded(Box>), Held(Box>), diff --git a/e2e_tests/fixture/src/vm.rs b/e2e_tests/fixture/src/vm.rs index ee5197832c..2d09aa05b4 100644 --- a/e2e_tests/fixture/src/vm.rs +++ b/e2e_tests/fixture/src/vm.rs @@ -269,7 +269,7 @@ impl Config { } pub fn with_stdout_hardware(mut self, hw_type: &str) -> Self { - self.console_hardware = hw_type.to_owned(); + self.console_hardware = hw_type.into(); self } diff --git a/ext2/tests/tests.rs b/ext2/tests/tests.rs index f97a5d0f9a..ecf1053a9c 100644 --- a/ext2/tests/tests.rs +++ b/ext2/tests/tests.rs @@ -266,9 +266,9 @@ fn test_file_contents() { let td = tempdir().unwrap(); let dir = td.path().join("testdata"); create_dir(&dir).unwrap(); - let mut hello = File::create(&dir.join("hello.txt")).unwrap(); + let mut hello = File::create(dir.join("hello.txt")).unwrap(); hello.write_all(b"Hello!\n").unwrap(); - let mut big = BufWriter::new(File::create(&dir.join("big.txt")).unwrap()); + let mut big = BufWriter::new(File::create(dir.join("big.txt")).unwrap()); let data = b"123456789\n"; for _ in 0..1024 { big.write_all(data).unwrap(); diff --git a/rust-toolchain b/rust-toolchain index bf7cf56576..5d46f6a5ec 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "1.73.0" +channel = "1.77.2" components = [ "rustfmt", "clippy", "llvm-tools-preview" ] diff --git a/tools/impl/dev_container/version b/tools/impl/dev_container/version index 08263e330f..7081effc15 100644 --- a/tools/impl/dev_container/version +++ b/tools/impl/dev_container/version @@ -1 +1 @@ -r0045 +r0046