Fixed warnings generated by rustc 1.57.0
This CL fixes several warnings generated by rustc 1.57. Many of these
warnings were related to unused fields. These fields had previously
been considered used because they were read by the Debug trait, but this
behavior changes in the new version of rustc. These fields are now
temporarily annotated to suppress warnings until it is determined if
they are needed.
Bug: 203802952
Test: Build and boot cuttlefish
Change-Id: I4eb1f6820a086ee9645206d7861caf0b8a04284c
diff --git a/authfs/src/fusefs.rs b/authfs/src/fusefs.rs
index 89bac45..549df1e 100644
--- a/authfs/src/fusefs.rs
+++ b/authfs/src/fusefs.rs
@@ -215,13 +215,13 @@
F: FnOnce(&mut AuthFsEntry, &Path, Inode) -> io::Result<AuthFsEntry>,
{
let mut inode_table = self.inode_table.lock().unwrap();
- let mut parent_entry = inode_table
+ let parent_entry = inode_table
.get_mut(&parent_inode)
.ok_or_else(|| io::Error::from_raw_os_error(libc::ENOENT))?;
let new_inode = self.next_inode.fetch_add(1, Ordering::Relaxed);
let basename: &Path = cstr_to_path(name);
- let new_file_entry = create_fn(&mut parent_entry, basename, new_inode)?;
+ let new_file_entry = create_fn(parent_entry, basename, new_inode)?;
if let btree_map::Entry::Vacant(entry) = inode_table.entry(new_inode) {
entry.insert(new_file_entry);
Ok(new_inode)