Skip to content

Commit 00245fd

Browse files
Enrique SaurezCopilot
andcommitted
style: format confirmed external-launch cleanup
Apply the repository rustfmt output from the pre-test formatting check without changing cleanup behavior or assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d5cb71c8-5f7f-4248-836b-4aae842c213d Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c6a9302c-f126-4231-832e-22426190bd6b
1 parent 1a9f471 commit 00245fd

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

‎nvx-rs/examples/external-launch.rs‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,10 @@ fn main() -> Result<(), Box<dyn Error>> {
130130
})();
131131
if let Err(error) = result {
132132
if let Err(cleanup) = launched.kill_and_confirm_exit() {
133-
return Err(
134-
io::Error::other(format!(
135-
"{error}; could not confirm exit of the launched VM: {cleanup}"
136-
))
137-
.into(),
138-
);
133+
return Err(io::Error::other(format!(
134+
"{error}; could not confirm exit of the launched VM: {cleanup}"
135+
))
136+
.into());
139137
}
140138
return Err(error);
141139
}

‎nvx-rs/tests/checked_handoff.rs‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,11 @@ fn launched_waits_return_and_retain_the_actual_exit_status() {
225225
let launched = vmm.launched.as_mut().unwrap();
226226
assert_eq!(launched.wait_timeout(TIMEOUT).unwrap(), Some(status));
227227
assert_eq!(launched.wait_timeout(Duration::ZERO).unwrap(), Some(status));
228-
vmm.launched.take().unwrap().kill_and_confirm_exit().unwrap();
228+
vmm.launched
229+
.take()
230+
.unwrap()
231+
.kill_and_confirm_exit()
232+
.unwrap();
229233
}
230234
}
231235

@@ -242,7 +246,11 @@ fn strict_cleanup_terminates_and_confirms_a_running_child() {
242246
vmm.report(STARTED_REPORT);
243247
let process = vmm.launched.as_ref().unwrap().process().unwrap();
244248
assert!(!process.has_exited().unwrap());
245-
vmm.launched.take().unwrap().kill_and_confirm_exit().unwrap();
249+
vmm.launched
250+
.take()
251+
.unwrap()
252+
.kill_and_confirm_exit()
253+
.unwrap();
246254
assert!(process.has_exited().unwrap());
247255
}
248256

0 commit comments

Comments
 (0)