Stylistically, this could be

```rust
match *self {
    LeafNode(ref leaf) => {
        match *other {
            LeafNode(ref leaf2) => leaf.cmp(leaf2),
            BranchNode(_) => Less
        }
    }
    BranchNode(ref branch) => {
        match *other {
            BranchNode(ref branch2) => branch.cmp(branch2),
            LeafNode(_) => Greater
        }
    }
}
```