Fix new lint warnings from rustc and clippy 1.74.0

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
This commit is contained in:
Andrew Gunnerson
2023-11-22 19:30:52 -05:00
parent 8e1adae947
commit 98071daa33
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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<u32>] = &[25102..25207, 25211..26500];
const VERS_SUPPORTED: &'static [Range<u32>] = &[25102..25207, 25211..26500];
const VER_PREINIT_DEVICE: Range<u32> =
25211..Self::VERS_SUPPORTED[Self::VERS_SUPPORTED.len() - 1].end;
const VER_RANDOM_SEED: Range<u32> = 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,
+1 -1
View File
@@ -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())