title: cannot borrow `*self` as mutable more than once at a time
body: <p>I don't understand this borrow checker error:</p>
  
  <pre><code>pub fn wait_for_device(&amp;mut self) -&gt; RoxResult&lt;hidapi::HidDevice&gt; {
      let mut device = self.open_device();
      let start = time::Instant::now();
      while device.is_err() {
          device = self.open_device();
          if start.elapsed().as_secs() &gt; 30 {
              return Err("Can't reconnect to device".to_owned());
          }
      }
      Ok(device.expect("Out of while so we should have a device"))
  }
  
  pub fn open_device(&amp;mut self) -&gt; RoxResult&lt;hidapi::HidDevice&gt; {
      let device_info = &amp;self.list[0]; 
      if let Ok(device) = self.api.open(device_info.vendor_id, device_info.product_id) {
          self.current_device = Some(device_info.clone());
          Ok(device)
      } else {
          Err(format!(
              "Error opening device vip: {:x} pid: {:x}",
              device_info.vendor_id, device_info.product_id
          ))
      }
  }
  </code></pre>
  
  <hr>
  
  <pre class="lang-none prettyprint-override"><code>error[E0499]: cannot borrow `*self` as mutable more than once at a time
    --&gt; src\usb.rs:64:22
     |
  61 |         let mut device = self.open_device();
     |                          ---- first mutable borrow occurs here
  ...
  64 |             device = self.open_device();
     |                      ^^^^ second mutable borrow occurs here
  ...
  70 |     }
     |     - first borrow ends here
  </code></pre>
  
  <p>I thought my first borrowing will end at the end of <code>open_device</code> but it seems I'm wrong. Why?</p>