diff options
author | Eliza Weisman <eliza@buoyant.io> | 2020-11-20 10:19:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-20 10:19:26 -0800 |
commit | f927f01a34d7cedf0cdc820f729a7a6cd56e83dd (patch) | |
tree | bd0243a653ee49cfc50bf61b00a36cc0fce6a414 | |
parent | 49abfdb2ac7f564c638ef99b973b1ab7a2b7ec84 (diff) |
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
-rw-r--r-- | tokio-macros/src/entry.rs | 18 |
1 files 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)); } |