]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/reorder-impl-items.rs
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
[rust.git] / src / tools / rustfmt / tests / target / reorder-impl-items.rs
1 // rustfmt-reorder_impl_items: true
2
3 // The ordering of the following impl items should be idempotent.
4 impl<'a> Command<'a> {
5     pub fn send_to(&self, w: &mut io::Write) -> io::Result<()> {
6         match self {
7             &Command::Data(ref c) => c.send_to(w),
8             &Command::Vrfy(ref c) => c.send_to(w),
9         }
10     }
11
12     pub fn parse(arg: &[u8]) -> Result<Command, ParseError> {
13         nom_to_result(command(arg))
14     }
15 }