Skip to content

Commit 491755a

Browse files
committed
Fix formatting (rustfmt nightly)
Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent 188e35e commit 491755a

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/hyperlight_host/src/sandbox/uninitialized.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,12 @@ impl UninitializedSandbox {
250250
let offset = gpa - base;
251251

252252
if gpa % core::mem::align_of::<u64>() != 0 {
253-
return Err(new_error!(
254-
"GPA {:#x} is not 8-byte aligned",
255-
gpa,
256-
));
253+
return Err(new_error!("GPA {:#x} is not 8-byte aligned", gpa,));
257254
}
258255

259-
let end = offset.checked_add(core::mem::size_of::<u64>()).ok_or_else(|| {
260-
new_error!("GPA {:#x} causes offset overflow", gpa)
261-
})?;
256+
let end = offset
257+
.checked_add(core::mem::size_of::<u64>())
258+
.ok_or_else(|| new_error!("GPA {:#x} causes offset overflow", gpa))?;
262259
if end > mem_size {
263260
return Err(new_error!(
264261
"GPA {:#x} (offset {:#x}, end {:#x}) is outside the sandbox memory region (size {:#x})",
@@ -1424,9 +1421,9 @@ mod tests {
14241421
mod guest_semaphore_tests {
14251422
use hyperlight_testing::simple_guest_as_string;
14261423

1424+
use crate::UninitializedSandbox;
14271425
use crate::mem::shared_mem::SharedMemory;
14281426
use crate::sandbox::uninitialized::GuestBinary;
1429-
use crate::UninitializedSandbox;
14301427

14311428
fn make_sandbox() -> UninitializedSandbox {
14321429
UninitializedSandbox::new(

0 commit comments

Comments
 (0)