[apkdmverify] Format main.rs with rustfmt
No code change in this cl.
Bug: 239413416
Test: atest MicrodroidTests
Change-Id: I2f9ae44c4c9e6c56f56afe70a04fe9a820bb7452
diff --git a/apkdmverity/src/main.rs b/apkdmverity/src/main.rs
index d9e9e2b..2901304 100644
--- a/apkdmverity/src/main.rs
+++ b/apkdmverity/src/main.rs
@@ -108,8 +108,10 @@
bail!("The size of {:?} is not multiple of {}.", &apk, BLOCK_SIZE)
}
(
- loopdevice::attach(&apk, 0, apk_size, /*direct_io*/ true, /*writable*/ false)
- .context("Failed to attach APK to a loop device")?,
+ loopdevice::attach(
+ &apk, 0, apk_size, /* direct_io */ true, /* writable */ false,
+ )
+ .context("Failed to attach APK to a loop device")?,
apk_size,
)
};
@@ -123,9 +125,10 @@
// Due to unknown reason(b/191344832), we can't enable "direct IO" for the IDSIG file (backing
// the hash). For now we don't use "direct IO" but it seems OK since the IDSIG file is very
// small and the benefit of direct-IO would be negliable.
- let hash_device =
- loopdevice::attach(&idsig, offset, size, /*direct_io*/ false, /*writable*/ false)
- .context("Failed to attach idsig to a loop device")?;
+ let hash_device = loopdevice::attach(
+ &idsig, offset, size, /* direct_io */ false, /* writable */ false,
+ )
+ .context("Failed to attach idsig to a loop device")?;
// Build a dm-verity target spec from the information from the idsig file. The apk and the
// idsig files are used as the data device and the hash device, respectively.
@@ -338,7 +341,7 @@
// of the data device is done in the scopeguard for the return value of `enable_verity`
// below. Only the idsig_loop_device needs detatching.
let apk_loop_device = loopdevice::attach(
- &apk_path, 0, apk_size, /*direct_io*/ true, /*writable*/ false,
+ &apk_path, 0, apk_size, /* direct_io */ true, /* writable */ false,
)
.unwrap();
let idsig_loop_device = scopeguard::guard(
@@ -346,8 +349,8 @@
&idsig_path,
0,
idsig_size,
- /*direct_io*/ false,
- /*writable*/ false,
+ /* direct_io */ false,
+ /* writable */ false,
)
.unwrap(),
|dev| loopdevice::detach(dev).unwrap(),