Skip to content

rustfmt_skip is ignored on expressions #1346

Closed
@CraZySacX

Description

@CraZySacX

Before:

#[cfg_attr(rustfmt, rustfmt_skip)]
Box::new(self.inner.call(req).then(move |result| {
    match result {
       Ok(resp) => Box::new(future::done(Ok(resp))),
       Err(e) => {
           try_error!(clo_stderr, "{}", e);
           Box::new(future::err(e))
       }
   }
}))

Run cargo fmt

After:

#[cfg_attr(rustfmt, rustfmt_skip)]
Box::new(self.inner.call(req).then(move |result| match result {
                                       Ok(resp) => Box::new(future::done(Ok(resp))),
                                       Err(e) => {
    try_error!(clo_stderr, "{}", e);
    Box::new(future::err(e))
}
                                   }))

I would expect nothing to happen to the original structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, non-idempotency, invalid code, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions