title: How to combine two cmp conditions in `Ord::cmp()`
body: <p>I'm trying to combine more than one condition when implementing <code>cmp()</code> and <code>eq()</code> from <code>Ord</code> and <code>PartialEq</code> traits. Something that looks like this:</p>
  <pre><code>self.id.cmp(&amp;other.id) &amp;&amp; self.age.cmp(&amp;other.age)
  </code></pre>
  <p>Here's a working example minus the combined condition:</p>
  <pre><code>use std::cmp::Ordering;
  
  #[derive(Debug, Clone, Eq)]
  pub struct Person {
      pub id: u32,
      pub age: u32,
  }
  
  impl Person {
      pub fn new(id: u32, age: u32) -&gt; Self {
          Self {
              id,
              age,
          }
      }
  }
  
  impl Ord for Person {
      fn cmp(&amp;self, other: &amp;Self) -&gt; Ordering {
          self.id.cmp(&amp;other.id)
      }
  }
  
  impl PartialOrd for Person {
      fn partial_cmp(&amp;self, other: &amp;Self) -&gt; Option&lt;Ordering&gt; {
          Some(self.cmp(other))
      }
  }
  
  impl PartialEq for Person {
      fn eq(&amp;self, other: &amp;Self) -&gt; bool {
          self.id == other.id
      }
  }
  </code></pre>