From 98071daa3358cf38b551a8a96b856d8e73025893 Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Wed, 22 Nov 2023 19:30:52 -0500 Subject: [PATCH] Fix new lint warnings from rustc and clippy 1.74.0 Signed-off-by: Andrew Gunnerson --- avbroot/src/boot.rs | 6 +++--- e2e/src/download.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/avbroot/src/boot.rs b/avbroot/src/boot.rs index cd08ca4..dc3df86 100644 --- a/avbroot/src/boot.rs +++ b/avbroot/src/boot.rs @@ -117,7 +117,7 @@ impl MagiskRootPatcher { // RULESDEVICE config option, which stored the writable block device as an // rdev major/minor pair, which was not consistent across reboots and was // replaced by PREINITDEVICE - const VERS_SUPPORTED: &[Range] = &[25102..25207, 25211..26500]; + const VERS_SUPPORTED: &'static [Range] = &[25102..25207, 25211..26500]; const VER_PREINIT_DEVICE: Range = 25211..Self::VERS_SUPPORTED[Self::VERS_SUPPORTED.len() - 1].end; const VER_RANDOM_SEED: Range = 25211..26103; @@ -407,7 +407,7 @@ pub struct OtaCertPatcher { } impl OtaCertPatcher { - const OTACERTS_PATH: &[u8] = b"system/etc/security/otacerts.zip"; + const OTACERTS_PATH: &'static [u8] = b"system/etc/security/otacerts.zip"; pub fn new(cert: Certificate) -> Self { Self { cert } @@ -528,7 +528,7 @@ impl PrepatchedImagePatcher { const MAX_LEVEL: u8 = 2; // We compile without Unicode support so we have to use [0-9] instead of \d. - const VERSION_REGEX: &str = r"Linux version ([0-9]+\.[0-9]+).[0-9]+-(android[0-9]+)-([0-9]+)-"; + const VERSION_REGEX: &'static str = r"Linux version ([0-9]+\.[0-9]+).[0-9]+-(android[0-9]+)-([0-9]+)-"; pub fn new( prepatched: &Path, diff --git a/e2e/src/download.rs b/e2e/src/download.rs index 1364209..11e8159 100644 --- a/e2e/src/download.rs +++ b/e2e/src/download.rs @@ -148,7 +148,7 @@ fn download_range( .read_timeout(TIMEOUT) .header( "Range", - &format!("bytes={}-{}", initial_range.start, initial_range.end - 1), + format!("bytes={}-{}", initial_range.start, initial_range.end - 1), ) .send() .and_then(|r| r.error_for_status())