Remove explicit lifetimes
This was reported by the needless-lifetimes lint during the rollout of
1.49.0. Also remove the attribute to use "android" clippy lints as this
is already enabled by default, based on the project location.
Bug: 177058330
Test: m authfs
Change-Id: I3ee9111a40b8806815f398da6e9011919831a72c
diff --git a/authfs/Android.bp b/authfs/Android.bp
index 104221e..225ff40 100644
--- a/authfs/Android.bp
+++ b/authfs/Android.bp
@@ -21,7 +21,6 @@
},
},
shared_libs: ["libcrypto"],
- clippy_lints: "android",
defaults: ["crosvm_defaults"],
}
diff --git a/authfs/src/fsverity.rs b/authfs/src/fsverity.rs
index 52aacf7..29e15d4 100644
--- a/authfs/src/fsverity.rs
+++ b/authfs/src/fsverity.rs
@@ -88,11 +88,11 @@
/// offset of the child node's hash. It is up to the iterator user to use the node and hash,
/// e.g. for the actual verification.
#[allow(clippy::needless_collect)]
-fn fsverity_walk<'a, T: ReadOnlyDataByChunk>(
+fn fsverity_walk<T: ReadOnlyDataByChunk>(
chunk_index: u64,
file_size: u64,
- merkle_tree: &'a T,
-) -> Result<impl Iterator<Item = Result<([u8; 4096], usize), FsverityError>> + 'a, FsverityError> {
+ merkle_tree: &T,
+) -> Result<impl Iterator<Item = Result<([u8; 4096], usize), FsverityError>> + '_, FsverityError> {
let hashes_per_node = T::CHUNK_SIZE / Sha256Hasher::HASH_SIZE as u64;
let hash_pages = divide_roundup(file_size, hashes_per_node * T::CHUNK_SIZE);
debug_assert_eq!(hashes_per_node, 128u64);