Skip to content
New issue

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

Feature request: Option to not create a new line before await #4425

Closed
figsoda opened this issue Sep 15, 2020 · 1 comment
Closed

Feature request: Option to not create a new line before await #4425

figsoda opened this issue Sep 15, 2020 · 1 comment

Comments

@figsoda
Copy link

figsoda commented Sep 15, 2020

Features request: option to not create a new line before await

Input

#[tokio::main]
async fn main() -> reqwest::Result<()> {
    reqwest::Client::new().get("http://example.org").send().await?.text().await?;
    Ok(())
}

Output

#[tokio::main]
async fn main() -> reqwest::Result<()> {
    reqwest::Client::new()
        .get("http://example.org")
        .send()
        .await?
        .text()
        .await?;
    Ok(())
}

Expected output

#[tokio::main]
async fn main() -> reqwest::Result<()> {
    reqwest::Client::new()
        .get("http://example.org")
        .send().await?
        .text().await?;
    Ok(())
}

Meta

  • rustfmt version: rustfmt 1.4.21-nightly (01f2ead 2020-09-04)
  • From where did you install rustfmt?: rustup
@ytmimi
Copy link
Contributor

ytmimi commented Jul 20, 2022

Closing this in favor of #4306

@ytmimi ytmimi closed this as not planned Won't fix, can't repro, duplicate, stale Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants