From f927f01a34d7cedf0cdc820f729a7a6cd56e83dd Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Fri, 20 Nov 2020 10:19:26 -0800 Subject: macros: fix rustfmt on 1.48.0 (#3160) ## Motivation Looks like the Rust 1.48.0 version of `rustfmt` changed some formatting rules (fixed some bugs?), and some of the code in `tokio-macros` is no longer correctly formatted. This is breaking CI. ## Solution This commit runs rustfmt on Rust 1.48.0. This fixes CI. Closes #3158 --- tokio-macros/src/entry.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tokio-macros/src/entry.rs b/tokio-macros/src/entry.rs index f5c62a4f..8f80499b 100644 --- a/tokio-macros/src/entry.rs +++ b/tokio-macros/src/entry.rs @@ -193,17 +193,23 @@ fn parse_knobs( let name = ident.unwrap().to_string().to_lowercase(); let msg = match name.as_str() { "threaded_scheduler" | "multi_thread" => { - format!("Set the runtime flavor with #[{}(flavor = \"multi_thread\")].", macro_name) - }, + format!( + "Set the runtime flavor with #[{}(flavor = \"multi_thread\")].", + macro_name + ) + } "basic_scheduler" | "current_thread" | "single_threaded" => { - format!("Set the runtime flavor with #[{}(flavor = \"current_thread\")].", macro_name) - }, + format!( + "Set the runtime flavor with #[{}(flavor = \"current_thread\")].", + macro_name + ) + } "flavor" | "worker_threads" => { format!("The `{}` attribute requires an argument.", name) - }, + } name => { format!("Unknown attribute {} is specified; expected one of: `flavor`, `worker_threads`", name) - }, + } }; return Err(syn::Error::new_spanned(path, msg)); } -- cgit v1.2.3