title: Why does Rust's documentation for methods use a separate builder struct as an example?
body: <p>I was going through the <a href="https://doc.rust-lang.org/book/method-syntax.html" rel="nofollow">struct and method docs</a> and was wondering why the docs use this example:</p>
  
  <pre><code>struct Circle {
      x: f64,
      y: f64,
      radius: f64,
  }
  
  impl Circle {
      fn area(&amp;self) -&gt; f64 {
          std::f64::consts::PI * (self.radius * self.radius)
      }
  }
  
  struct CircleBuilder {
      x: f64,
      y: f64,
      radius: f64,
  }
  
  impl CircleBuilder {
      fn new() -&gt; CircleBuilder {
          CircleBuilder { x: 0.0, y: 0.0, radius: 1.0, }
      }
  
      fn x(&amp;mut self, coordinate: f64) -&gt; &amp;mut CircleBuilder {
          self.x = coordinate;
          self
      }
  
      fn y(&amp;mut self, coordinate: f64) -&gt; &amp;mut CircleBuilder {
          self.y = coordinate;
          self
      }
  
      fn radius(&amp;mut self, radius: f64) -&gt; &amp;mut CircleBuilder {
          self.radius = radius;
          self
      }
  
      fn finalize(&amp;self) -&gt; Circle {
          Circle { x: self.x, y: self.y, radius: self.radius }
      }
  }
  
  fn main() {
      let c = CircleBuilder::new()
              .x(1.0)
              .y(2.0)
              .radius(2.0)
              .finalize();
  
      println!("area: {}", c.area());
      println!("x: {}", c.x);
      println!("y: {}", c.y);
  }
  </code></pre>
  
  <p>My slightly modified code is smaller and appears to do the exact same thing:</p>
  
  <pre><code>struct Circle {
      x: f64,
      y: f64,
      radius: f64,
  }
  
  
  impl Circle {
      fn new() -&gt; Circle {
          Circle { x: 0.0, y: 0.0, radius: 1.0, }
      }
  
      fn x(&amp;mut self, coordinate: f64) -&gt; &amp;mut Circle {
          self.x = coordinate;
          self
      }
  
      fn y(&amp;mut self, coordinate: f64) -&gt; &amp;mut Circle {
          self.y = coordinate;
          self
      }
  
      fn radius(&amp;mut self, radius: f64) -&gt; &amp;mut Circle {
          self.radius = radius;
          self
      }
  
      fn area(&amp;self) -&gt; f64 {
          std::f64::consts::PI * (self.radius * self.radius)
      }
  
      fn finalize(&amp;self) -&gt; Circle {
          Circle { x: self.x, y: self.y, radius: self.radius }
      }
  }
  
  fn main() {
      let c = Circle::new()
              .x(1.0)
              .y(2.0)
              .radius(2.0)
              .finalize();
  
      println!("area: {}", c.area());
      println!("x: {}", c.x);
      println!("y: {}", c.y);
  }
  </code></pre>