Skip to content

Commit 9cdac82

Browse files
committed
Cargo fmt and update a test
1 parent 5ccc23f commit 9cdac82

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

rustfmt-bin/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ fn main() {
2727
// (git not installed or if this is not a git repository) just return an empty string.
2828
fn commit_info() -> String {
2929
match (channel(), commit_hash(), commit_date()) {
30-
(channel, Some(hash), Some(date)) => format!("{} ({} {})", channel, hash.trim_right(), date),
30+
(channel, Some(hash), Some(date)) => {
31+
format!("{} ({} {})", channel, hash.trim_right(), date)
32+
}
3133
_ => String::new(),
3234
}
3335
}

rustfmt-core/src/types.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -529,12 +529,9 @@ impl Rewrite for ast::TyParamBound {
529529
ast::TyParamBound::TraitTyParamBound(ref tref, ast::TraitBoundModifier::None) => {
530530
tref.rewrite(context, shape)
531531
}
532-
ast::TyParamBound::TraitTyParamBound(ref tref, ast::TraitBoundModifier::Maybe) => {
533-
Some(format!(
534-
"?{}",
535-
tref.rewrite(context, shape.offset_left(1)?)?
536-
))
537-
}
532+
ast::TyParamBound::TraitTyParamBound(ref tref, ast::TraitBoundModifier::Maybe) => Some(
533+
format!("?{}", tref.rewrite(context, shape.offset_left(1)?)?),
534+
),
538535
ast::TyParamBound::RegionTyParamBound(ref l) => l.rewrite(context, shape),
539536
}
540537
}

rustfmt-core/tests/target/configs/indent_style/block_call.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ fn main() {
1313
"elit",
1414
);
1515
// #1501
16-
let hyper = Arc::new(Client::with_connector(HttpsConnector::new(
17-
TlsClient::new(),
18-
)));
16+
let hyper = Arc::new(Client::with_connector(
17+
HttpsConnector::new(TlsClient::new()),
18+
));
1919

2020
// chain
2121
let x = yooooooooooooo

0 commit comments

Comments
 (0)