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 <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Daniel Verkamp 2024-06-05 14:33:08 -07:00 committed by crosvm LUCI
parent 79ad1c82b2
commit 8c2a5647d1
6 changed files with 7 additions and 6 deletions

View file

@ -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;

View file

@ -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<dyn DecodedHandle<Descriptor = BufferDescWithPicId>>),
Held(Box<dyn AsRef<BufferDescWithPicId>>),

View file

@ -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
}

View file

@ -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();

View file

@ -1,3 +1,3 @@
[toolchain]
channel = "1.73.0"
channel = "1.77.2"
components = [ "rustfmt", "clippy", "llvm-tools-preview" ]

View file

@ -1 +1 @@
r0045
r0046