rust/tests/source/issue-3029.rs
Otavio Salvador 8feeddf1f8 Only combine match if its condition expression fits in a single line
This improves the formatting and reading of code avoiding the
condition expression to be rewrite, if it goes multi line.

Fixes: #3029.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-10-12 20:12:45 -03:00

22 lines
521 B
Rust

fn foo() {
EvaluateJSReply::NumberValue(
match FromJSValConvertible::from_jsval(cx, rval.handle(), ()) {
Ok(ConversionResult::Success(v)) => v,
_ => unreachable!(),
},
)
}
fn bar() {
{
{
EvaluateJSReply::NumberValue(
match FromJSValConvertible::from_jsval(cx, rval.handle(), ()) {
Ok(ConversionResult::Success(v)) => v,
_ => unreachable!(),
},
)
}
}
}