fn activate_jig(&self, id: &UnitName) -> Result<(), UnitActivateError> {
        let current_jig_opt = self.current_jig.borrow();

        match *current_jig_opt {
            None => Err(UnitActivateError::UnitNotSelected),
            Some(ref s) => if s.borrow_mut().id() != id {
                Err(UnitActivateError::UnitNotSelected)
            } else {
                // Activate this jig.
                s.borrow_mut().activate(self, &*self.cfg.lock().unwrap())
            }
        }
    }
/// Set the new jig as "Active".
/// The jig must already be set as the current jig.

Set the new jig as "Active".
The jig must already be set as the current jig.
Set the new jig as " Active " . The jig must already be set as the current jig .
fn activate_jig(&self, id: &UnitName) -> Result<(), UnitActivateError> {
        let current_jig_opt = self.current_jig.borrow();
        match *current_jig_opt {
            None => Err(UnitActivateError::UnitNotSelected),
            Some(ref s) => if s.borrow_mut().id() != id {
                Err(UnitActivateError::UnitNotSelected)
            } else {
                // Activate this jig.
                s.borrow_mut().activate(self, &*self.cfg.lock().unwrap())
            }
        }
    }
fn activate_jig ( & self , id : & UnitName ) -> Result < ( ) , UnitActivateError > { let current_jig_opt = self . current_jig . borrow ( ) ; match * current_jig_opt { None => Err ( UnitActivateError :: UnitNotSelected ) , Some ( ref s ) => if s . borrow_mut ( ) . id ( ) != id { Err ( UnitActivateError :: UnitNotSelected ) } else { // Activate this jig.
 s . borrow_mut ( ) . activate ( self , & * self . cfg . lock ( ) . unwrap ( ) ) } } }
Set the new jig as "Active".
Set the new jig as " Active " .
&self
id
&UnitName
&self
id
&UnitName