Change request for Rust v1.68.0
error: this `impl` can be derived
--> packages/modules/Virtualization/microdroid/payload/config/src/lib.rs:90:1
|
90 | / impl Default for TaskType {
91 | | fn default() -> TaskType {
92 | | TaskType::Executable
93 | | }
94 | | }
| |_^
bug: 270756468
Test: test_compiler.py
Change-Id: Ibad99d63b88efa8a20e6f618abe7b86159139234
diff --git a/libs/apkverify/src/v4.rs b/libs/apkverify/src/v4.rs
index 94abf99..e77ad77 100644
--- a/libs/apkverify/src/v4.rs
+++ b/libs/apkverify/src/v4.rs
@@ -104,9 +104,10 @@
}
/// Version of the idsig file format
-#[derive(Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
+#[derive(Debug, PartialEq, Eq, FromPrimitive, ToPrimitive, Default)]
#[repr(u32)]
pub enum Version {
+ #[default]
/// Version 2, the only supported version.
V2 = 2,
}
@@ -117,12 +118,6 @@
}
}
-impl Default for Version {
- fn default() -> Self {
- Version::V2
- }
-}
-
impl V4Signature<fs::File> {
/// Creates a `V4Signature` struct from the given idsig path.
pub fn from_idsig_path<P: AsRef<Path>>(idsig_path: P) -> Result<Self> {