diff options
author | David Pursell <dpursell@google.com> | 2023-11-29 21:12:13 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-11-29 21:12:13 +0000 |
commit | f5e5c9470df2d921b3fcdbc35dec339b864a5301 (patch) | |
tree | 3f57220940dc92ea4fd356fc4ce3f8d674322aea /rust/tests/verify_tests.rs | |
parent | 8930593dbd85d01536be899fb7388e2985c94a9e (diff) | |
parent | 0315b332ebb61c2ae667e4005033753d4255c3f7 (diff) | |
download | avb-f5e5c9470df2d921b3fcdbc35dec339b864a5301.tar.gz |
libavb_rs: export Result types am: 0315b332eb
Original change: https://android-review.googlesource.com/c/platform/external/avb/+/2851526
Change-Id: I318abb4c0b02cb969d5a4cbb425a2330be137618
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'rust/tests/verify_tests.rs')
-rw-r--r-- | rust/tests/verify_tests.rs | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/rust/tests/verify_tests.rs b/rust/tests/verify_tests.rs index 416e0ec..13d4912 100644 --- a/rust/tests/verify_tests.rs +++ b/rust/tests/verify_tests.rs @@ -17,6 +17,7 @@ use crate::test_ops::TestOps; use avb::{ slot_verify, HashtreeErrorMode, IoError, SlotVerifyData, SlotVerifyError, SlotVerifyFlags, + SlotVerifyResult, }; use std::{ffi::CString, fs}; #[cfg(feature = "uuid")] @@ -50,9 +51,7 @@ fn test_ops_one_image_one_vbmeta() -> TestOps { } /// Calls `slot_verify()` using standard args for `test_ops_one_image_one_vbmeta()` setup. -fn verify_one_image_one_vbmeta<'a>( - ops: &'a mut TestOps, -) -> Result<SlotVerifyData<'a>, SlotVerifyError<'a>> { +fn verify_one_image_one_vbmeta(ops: &mut TestOps) -> SlotVerifyResult<SlotVerifyData> { slot_verify( ops, &[&CString::new(TEST_PARTITION_NAME).unwrap()], @@ -74,9 +73,7 @@ fn test_ops_two_images_one_vbmeta() -> TestOps { } /// Calls `slot_verify()` using standard args for `test_ops_two_images_one_vbmeta()` setup. -fn verify_two_images_one_vbmeta<'a>( - ops: &'a mut TestOps, -) -> Result<SlotVerifyData<'a>, SlotVerifyError<'a>> { +fn verify_two_images_one_vbmeta(ops: &mut TestOps) -> SlotVerifyResult<SlotVerifyData> { slot_verify( ops, &[ @@ -102,9 +99,7 @@ fn test_ops_boot_partition() -> TestOps { } /// Calls `slot_verify()` using standard args for `test_ops_boot_partition()` setup. -fn verify_boot_partition<'a>( - ops: &'a mut TestOps, -) -> Result<SlotVerifyData<'a>, SlotVerifyError<'a>> { +fn verify_boot_partition(ops: &mut TestOps) -> SlotVerifyResult<SlotVerifyData> { slot_verify( ops, &[&CString::new("boot").unwrap()], @@ -133,9 +128,7 @@ fn test_ops_persistent_digest(image: Vec<u8>) -> TestOps { } /// Calls `slot_verify()` using standard args for `test_ops_persistent_digest()` setup. -fn verify_persistent_digest<'a>( - ops: &'a mut TestOps, -) -> Result<SlotVerifyData<'a>, SlotVerifyError<'a>> { +fn verify_persistent_digest(ops: &mut TestOps) -> SlotVerifyResult<SlotVerifyData> { slot_verify( ops, &[&CString::new(TEST_PARTITION_PERSISTENT_DIGEST_NAME).unwrap()], |