From 404c7bcc0aea59b82d7347058043b8de7133241c Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 9 Jan 2022 01:15:08 +0900 Subject: [PATCH] Remove rustfmt.toml --- rustfmt.toml | 1 - src/spawn.rs | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 rustfmt.toml diff --git a/rustfmt.toml b/rustfmt.toml deleted file mode 100644 index 3d1411f..0000000 --- a/rustfmt.toml +++ /dev/null @@ -1 +0,0 @@ -version = 'Two' diff --git a/src/spawn.rs b/src/spawn.rs index 8ce491a..e01d0d0 100644 --- a/src/spawn.rs +++ b/src/spawn.rs @@ -40,10 +40,8 @@ pub fn spawn(future: impl Future + Send + 'static for n in 1..=num_threads { thread::Builder::new() .name(format!("smol-{}", n)) - .spawn(|| { - loop { - catch_unwind(|| block_on(GLOBAL.run(future::pending::<()>()))).ok(); - } + .spawn(|| loop { + catch_unwind(|| block_on(GLOBAL.run(future::pending::<()>()))).ok(); }) .expect("cannot spawn executor thread"); }