Format source codes

This commit is contained in:
topecongiro 2017-07-03 18:54:26 +09:00
parent 89aaf3bf03
commit bd991851c8
5 changed files with 25 additions and 10 deletions

View File

@ -421,7 +421,9 @@ pub struct FormatReport {
impl FormatReport {
fn new() -> FormatReport {
FormatReport { file_error_map: HashMap::new() }
FormatReport {
file_error_map: HashMap::new(),
}
}
pub fn warning_count(&self) -> usize {

View File

@ -56,8 +56,12 @@ struct Foo {
fn foo() {
#[cfg(target_os = "freertos")]
match port_id {
'a' | 'A' => GpioPort { port_address: GPIO_A },
'b' | 'B' => GpioPort { port_address: GPIO_B },
'a' | 'A' => GpioPort {
port_address: GPIO_A,
},
'b' | 'B' => GpioPort {
port_address: GPIO_B,
},
_ => panic!(),
}

View File

@ -12,7 +12,8 @@ fn baz(p: Packet) {
loop {
loop {
if let Packet::Transaction {
state: TransactionState::Committed(ts, ..), ..
state: TransactionState::Committed(ts, ..),
..
} = p
{
unreachable!()

View File

@ -3,7 +3,10 @@ fn main() {
for event in event_pump.poll_iter() {
match event {
Event::Quit { .. } |
Event::KeyDown { keycode: Some(Keycode::Escape), .. } => break 'running,
Event::KeyDown {
keycode: Some(Keycode::Escape),
..
} => break 'running,
}
}
}
@ -14,9 +17,10 @@ fn main2() {
for event in event_pump.poll_iter() {
match event {
Event::Quit { .. } |
Event::KeyDownXXXXXXXXXXXXX { keycode: Some(Keycode::Escape), .. } => {
break 'running
}
Event::KeyDownXXXXXXXXXXXXX {
keycode: Some(Keycode::Escape),
..
} => break 'running,
}
}
}

View File

@ -116,7 +116,9 @@ fn struct_exprs() {
..base
};
IntrinsicISizesContribution {
content_intrinsic_sizes: IntrinsicISizes { minimum_inline_size: 0 },
content_intrinsic_sizes: IntrinsicISizes {
minimum_inline_size: 0,
},
};
}
@ -141,7 +143,9 @@ fn issue491() {
arm: 0, // Comment
};
Foo { arm: 0 /* Comment */ };
Foo {
arm: 0, // Comment
};
Foo {
a: aaaaaaaaaa,