Update tests

This commit is contained in:
topecongiro 2017-07-11 21:53:48 +09:00
parent e3310a6a18
commit be55f856bb
5 changed files with 41 additions and 55 deletions

View File

@ -173,17 +173,15 @@ fn macros() {
baz!(one_item_macro_which_is_also_loooooooooooooooooooooooooooooooooooooooooooooooong);
let _ = match option {
None => {
baz!(
function,
like,
macro_as,
expression,
which,
is,
loooooooooooooooong
)
}
None => baz!(
function,
like,
macro_as,
expression,
which,
is,
loooooooooooooooong
),
Some(p) => baz!(one_item_macro_as_expression_which_is_also_loooooooooooooooong),
};
}
@ -318,12 +316,10 @@ fn combine_block() {
y => func(
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
),
_ => {
func(
x,
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
zzz,
)
}
_ => func(
x,
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
zzz,
),
}
}

View File

@ -15,14 +15,12 @@ fn main() {
2 => "two",
3 => "three",
4 => "four",
5 => {
match y {
'a' => 'A',
'b' => 'B',
'c' => 'C',
_ => "Nope",
}
}
5 => match y {
'a' => 'A',
'b' => 'B',
'c' => 'C',
_ => "Nope",
},
_ => "something else",
}

View File

@ -5,12 +5,10 @@ impl Struct {
fn fun() {
let result = match <R::RequestResult as serde::Deserialize>::deserialize(&json) {
Ok(v) => v,
Err(e) => {
match <R::ErrorResult as serde::Deserialize>::deserialize(&json) {
Ok(v) => return Err(Error::with_json(v)),
Err(e2) => return Err(Error::with_json(e)),
}
}
Err(e) => match <R::ErrorResult as serde::Deserialize>::deserialize(&json) {
Ok(v) => return Err(Error::with_json(v)),
Err(e2) => return Err(Error::with_json(e)),
},
};
}
}

View File

@ -215,14 +215,12 @@ fn issue355() {
wc => println!["a", b], // comment
xc => vec![1, 2], // comment
yc => vec![3; 4], // comment
yd => {
looooooooooooooooooooooooooooooooooooooooooooooooooooooooong_func(
aaaaaaaaaa,
bbbbbbbbbb,
cccccccccc,
dddddddddd,
)
}
yd => looooooooooooooooooooooooooooooooooooooooooooooooooooooooong_func(
aaaaaaaaaa,
bbbbbbbbbb,
cccccccccc,
dddddddddd,
),
}
}
@ -342,14 +340,12 @@ fn issue1371() {
}
sfEvtLostFocus => LostFocus,
sfEvtGainedFocus => GainedFocus,
sfEvtTextEntered => {
TextEntered {
unicode: unsafe {
::std::char::from_u32((*event.text.as_ref()).unicode)
.expect("Invalid unicode encountered on TextEntered event")
},
}
}
sfEvtTextEntered => TextEntered {
unicode: unsafe {
::std::char::from_u32((*event.text.as_ref()).unicode)
.expect("Invalid unicode encountered on TextEntered event")
},
},
sfEvtKeyPressed => {
let e = unsafe { event.key.as_ref() };

View File

@ -19,13 +19,11 @@ fn main() {
},
|item| {
match *item {
StructLitField::Regular(ref field) => {
rewrite_field(
inner_context,
&field,
&Constraints::new(v_budget.checked_sub(1).unwrap_or(0), indent),
)
}
StructLitField::Regular(ref field) => rewrite_field(
inner_context,
&field,
&Constraints::new(v_budget.checked_sub(1).unwrap_or(0), indent),
),
StructLitField::Base(ref expr) => {
// 2 = ..
expr.rewrite(