Update source for Rust 1.63.0
Test: m rust Bug: 241303140 Change-Id: I049703784a73242c84414ea12e0ed82609add8c2
This commit is contained in:
parent
62d012dd99
commit
6f5a9b5d16
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -285,7 +285,7 @@ fn get_key() -> Result<ZVec> {
|
|||
Ok(key)
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
pub struct MicrodroidData {
|
||||
pub salt: Vec<u8>, // Should be [u8; 64] but that isn't serializable.
|
||||
pub apk_data: ApkData,
|
||||
|
@ -293,7 +293,7 @@ pub struct MicrodroidData {
|
|||
pub apex_data: Vec<ApexData>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
pub struct ApkData {
|
||||
pub root_hash: Box<RootHash>,
|
||||
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<u8>,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue