From 6f5a9b5d16366f3936b258b31a39652012687bfe Mon Sep 17 00:00:00 2001 From: Chris Wailes Date: Thu, 11 Aug 2022 15:01:54 -0700 Subject: [PATCH] Update source for Rust 1.63.0 Test: m rust Bug: 241303140 Change-Id: I049703784a73242c84414ea12e0ed82609add8c2 --- libs/apkverify/src/ziputil.rs | 2 +- libs/idsig/src/apksigv4.rs | 6 +++--- microdroid_manager/src/instance.rs | 6 +++--- zipfuse/src/inode.rs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/apkverify/src/ziputil.rs b/libs/apkverify/src/ziputil.rs index f18a38a8..ebb66e0f 100644 --- a/libs/apkverify/src/ziputil.rs +++ b/libs/apkverify/src/ziputil.rs @@ -27,7 +27,7 @@ const EOCD_CENTRAL_DIRECTORY_OFFSET_FIELD_OFFSET: usize = 16; const EOCD_MAGIC: u32 = 0x06054b50; const ZIP64_MARK: u32 = 0xffffffff; -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub struct ZipSections { pub central_directory_offset: u32, pub central_directory_size: u32, diff --git a/libs/idsig/src/apksigv4.rs b/libs/idsig/src/apksigv4.rs index db8a8c62..f8ca1843 100644 --- a/libs/idsig/src/apksigv4.rs +++ b/libs/idsig/src/apksigv4.rs @@ -75,7 +75,7 @@ pub struct SigningInfo { } /// Version of the idsig file format -#[derive(Debug, PartialEq, FromPrimitive, ToPrimitive)] +#[derive(Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)] #[repr(u32)] pub enum Version { /// Version 2, the only supported version. @@ -95,7 +95,7 @@ impl Default for Version { } /// Hash algorithm that can be used for idsig file. -#[derive(Debug, PartialEq, FromPrimitive, ToPrimitive)] +#[derive(Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)] #[repr(u32)] pub enum HashAlgorithm { /// SHA2-256 @@ -115,7 +115,7 @@ impl Default for HashAlgorithm { } /// Signature algorithm that can be used for idsig file -#[derive(Debug, PartialEq, FromPrimitive, ToPrimitive)] +#[derive(Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)] #[allow(non_camel_case_types)] #[repr(u32)] pub enum SignatureAlgorithmId { diff --git a/microdroid_manager/src/instance.rs b/microdroid_manager/src/instance.rs index 76c8b235..358d88bb 100644 --- a/microdroid_manager/src/instance.rs +++ b/microdroid_manager/src/instance.rs @@ -285,7 +285,7 @@ fn get_key() -> Result { Ok(key) } -#[derive(Debug, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct MicrodroidData { pub salt: Vec, // Should be [u8; 64] but that isn't serializable. pub apk_data: ApkData, @@ -293,7 +293,7 @@ pub struct MicrodroidData { pub apex_data: Vec, } -#[derive(Debug, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct ApkData { pub root_hash: Box, pub pubkey: Box<[u8]>, @@ -301,7 +301,7 @@ pub struct ApkData { pub type RootHash = [u8]; -#[derive(Debug, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct ApexData { pub name: String, pub public_key: Vec, diff --git a/zipfuse/src/inode.rs b/zipfuse/src/inode.rs index e6c02547..5d529227 100644 --- a/zipfuse/src/inode.rs +++ b/zipfuse/src/inode.rs @@ -62,7 +62,7 @@ pub struct DirectoryEntry { pub kind: InodeKind, } -#[derive(Debug, Clone, PartialEq, Copy)] +#[derive(Debug, Clone, PartialEq, Eq, Copy)] pub enum InodeKind { Directory, File,