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
This commit is contained in:
Eliza Weisman 2020-11-20 10:19:26 -08:00 committed by GitHub
parent 49abfdb2ac
commit f927f01a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));
}