We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pub fn run(config: Config) -> io::Result<()> { let mut lp = try!(Core::new()); let handle = lp.handle(); let enable_udp = config.enable_udp; let context = Context::new(handle, config); Context::set(&context, move || if enable_udp { let tcp_fut = run_tcp(); let udp_fut = run_udp(); lp.run(tcp_fut.join(udp_fut).map(|_| ())) } else { let tcp_fut = run_tcp(); lp.run(tcp_fut) }) }
As you can see, the closure passed to set function only has one if expression. And rustfmt won't allow me to add a block around it.
set
if
rustfmt
It would be better if it is formatted as
problem will also occurs for match and other expressions that has a block in it.
match
Maybe related to #1570 or #1504.
The text was updated successfully, but these errors were encountered:
This is intentional. It might be worth bringing this up on rust-lang/style-team#61
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
As you can see, the closure passed to
set
function only has oneif
expression. Andrustfmt
won't allow me to add a block around it.It would be better if it is formatted as
problem will also occurs for
match
and other expressions that has a block in it.Maybe related to #1570 or #1504.
The text was updated successfully, but these errors were encountered: