Add a test for #2634
This commit is contained in:
parent
37c216c50f
commit
faa5a10d20
15
tests/source/reorder-impl-items.rs
Normal file
15
tests/source/reorder-impl-items.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// rustfmt-reorder_impl_items: true
|
||||
|
||||
// The ordering of the folllowing impl items should be idempotent.
|
||||
impl<'a> Command<'a> {
|
||||
pub fn send_to(&self, w: &mut io::Write) -> io::Result<()> {
|
||||
match self {
|
||||
&Command::Data(ref c) => c.send_to(w),
|
||||
&Command::Vrfy(ref c) => c.send_to(w),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse(arg: &[u8]) -> Result<Command, ParseError> {
|
||||
nom_to_result(command(arg))
|
||||
}
|
||||
}
|
15
tests/target/reorder-impl-items.rs
Normal file
15
tests/target/reorder-impl-items.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// rustfmt-reorder_impl_items: true
|
||||
|
||||
// The ordering of the folllowing impl items should be idempotent.
|
||||
impl<'a> Command<'a> {
|
||||
pub fn send_to(&self, w: &mut io::Write) -> io::Result<()> {
|
||||
match self {
|
||||
&Command::Data(ref c) => c.send_to(w),
|
||||
&Command::Vrfy(ref c) => c.send_to(w),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse(arg: &[u8]) -> Result<Command, ParseError> {
|
||||
nom_to_result(command(arg))
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user