Fix warnings from Rust 1.65.0
Bug: 250026064
Test: m rust
Change-Id: I264dc2c92525a64f91706a0015d61d16c9cb4d6c
diff --git a/apkdmverity/src/main.rs b/apkdmverity/src/main.rs
index 50b6069..b9b88d4 100644
--- a/apkdmverity/src/main.rs
+++ b/apkdmverity/src/main.rs
@@ -69,7 +69,7 @@
optional; idsig file's root hash will be used if specified as \"none\"."
)
.action(ArgAction::Append)
- .value_names(&["apk_path", "idsig_path", "name", "root_hash"]),
+ .value_names(["apk_path", "idsig_path", "name", "root_hash"]),
)
.arg(
Arg::new("verbose")
diff --git a/avmd/src/main.rs b/avmd/src/main.rs
index 740e9aa..8d7cb57 100644
--- a/avmd/src/main.rs
+++ b/avmd/src/main.rs
@@ -128,21 +128,21 @@
.arg(
Arg::new("vbmeta")
.long("vbmeta")
- .value_names(&namespace_name_file)
+ .value_names(namespace_name_file)
.num_args(3)
.action(ArgAction::Append),
)
.arg(
Arg::new("apk")
.long("apk")
- .value_names(&namespace_name_file)
+ .value_names(namespace_name_file)
.num_args(3)
.action(ArgAction::Append),
)
.arg(
Arg::new("apex-payload")
.long("apex-payload")
- .value_names(&namespace_name_file)
+ .value_names(namespace_name_file)
.num_args(3)
.action(ArgAction::Append),
),
diff --git a/encryptedstore/src/main.rs b/encryptedstore/src/main.rs
index 888485b..2f54534 100644
--- a/encryptedstore/src/main.rs
+++ b/encryptedstore/src/main.rs
@@ -63,7 +63,7 @@
fn encryptedstore_init(blkdevice: &Path, key: &str, mountpoint: &Path) -> Result<()> {
ensure!(
- std::fs::metadata(&blkdevice)
+ std::fs::metadata(blkdevice)
.context(format!("Failed to get metadata of {:?}", blkdevice))?
.file_type()
.is_block_device(),
diff --git a/libs/libfdt/src/lib.rs b/libs/libfdt/src/lib.rs
index 7c72fab..3440f1b 100644
--- a/libs/libfdt/src/lib.rs
+++ b/libs/libfdt/src/lib.rs
@@ -16,7 +16,6 @@
//! to a bare-metal environment.
#![no_std]
-#![feature(let_else)] // Stabilized in 1.65.0
mod iterators;
diff --git a/pvmfw/src/main.rs b/pvmfw/src/main.rs
index 8633595..a249e8d 100644
--- a/pvmfw/src/main.rs
+++ b/pvmfw/src/main.rs
@@ -17,7 +17,6 @@
#![no_main]
#![no_std]
#![feature(default_alloc_error_handler)]
-#![feature(ptr_const_cast)] // Stabilized in 1.65.0
extern crate alloc;
diff --git a/virtualizationmanager/src/crosvm.rs b/virtualizationmanager/src/crosvm.rs
index 98e7d99..b6109c6 100644
--- a/virtualizationmanager/src/crosvm.rs
+++ b/virtualizationmanager/src/crosvm.rs
@@ -376,7 +376,7 @@
&self.name,
death_reason,
exit_signal,
- &*vm_metric,
+ &vm_metric,
);
// Delete temporary files. The folder itself is removed by VirtualizationServiceInternal.