Cargo fmt and update a test

This commit is contained in:
topecongiro 2018-02-23 08:14:22 +09:00
parent 5ccc23f920
commit 9cdac82d42
3 changed files with 9 additions and 10 deletions

View file

@ -27,7 +27,9 @@ fn main() {
// (git not installed or if this is not a git repository) just return an empty string.
fn commit_info() -> String {
match (channel(), commit_hash(), commit_date()) {
(channel, Some(hash), Some(date)) => format!("{} ({} {})", channel, hash.trim_right(), date),
(channel, Some(hash), Some(date)) => {
format!("{} ({} {})", channel, hash.trim_right(), date)
}
_ => String::new(),
}
}

View file

@ -529,12 +529,9 @@ impl Rewrite for ast::TyParamBound {
ast::TyParamBound::TraitTyParamBound(ref tref, ast::TraitBoundModifier::None) => {
tref.rewrite(context, shape)
}
ast::TyParamBound::TraitTyParamBound(ref tref, ast::TraitBoundModifier::Maybe) => {
Some(format!(
"?{}",
tref.rewrite(context, shape.offset_left(1)?)?
))
}
ast::TyParamBound::TraitTyParamBound(ref tref, ast::TraitBoundModifier::Maybe) => Some(
format!("?{}", tref.rewrite(context, shape.offset_left(1)?)?),
),
ast::TyParamBound::RegionTyParamBound(ref l) => l.rewrite(context, shape),
}
}

View file

@ -13,9 +13,9 @@ fn main() {
"elit",
);
// #1501
let hyper = Arc::new(Client::with_connector(HttpsConnector::new(
TlsClient::new(),
)));
let hyper = Arc::new(Client::with_connector(
HttpsConnector::new(TlsClient::new()),
));
// chain
let x = yooooooooooooo