From 9b211d4cb084bc9b0e9e38a7bb0386e632d4eb78 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 14 Jan 2024 23:23:05 +0800 Subject: [PATCH] work around rustfmt issue --- services/pddb/src/main.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/services/pddb/src/main.rs b/services/pddb/src/main.rs index 44e0f0f5a..467d27200 100644 --- a/services/pddb/src/main.rs +++ b/services/pddb/src/main.rs @@ -477,7 +477,10 @@ fn wrapped_main() -> ! { // other processes from crafting them. let pw_sid = xous::create_server().expect("couldn't create a server for the password UX handler"); let pw_cid = xous::connect(pw_sid).expect("couldn't connect to the password UX handler"); - let pw_handle = thread::spawn({ move || password_ux_manager(xous::connect(pddb_sid).unwrap(), pw_sid) }); + let pw_handle = thread::spawn({ + // this comment keeps rustfmt from flattening this block + move || password_ux_manager(xous::connect(pddb_sid).unwrap(), pw_sid) + }); // OS-specific PDDB driver let mut pddb_os = PddbOs::new(Rc::clone(&entropy), pw_cid); @@ -1738,9 +1741,9 @@ fn wrapped_main() -> ! { None }, ) { - Ok((list, _, _)) => list.into_iter().rev().collect(), /* reverse order so Vec can - * just pop and get "first" - * item */ + Ok((list, _, _)) => list.into_iter().rev().collect(), /* reverse order so Vec can */ + // just pop and get "first" + // item Err(e) => { match e.kind() { std::io::ErrorKind::NotFound => buf[..4]