fn activate_scenario(&self, id: &UnitName) -> Result<(), UnitActivateError> {
        let current_opt = self.current_scenario.borrow();

        match *current_opt {
            None => Err(UnitActivateError::UnitNotSelected),
            Some(ref s) => if s.borrow().id() != id {
                Err(UnitActivateError::UnitNotSelected)
            } else {
                // Activate this scenario.
                self.bc.broadcast(&UnitEvent::Log(LogEntry::new_info(id.clone(), format!("scenario starting"))));
                s.borrow_mut().activate(self, &*self.cfg.lock().unwrap())
            }
        }
    }
/// Set the specified scenario as "Active".
/// This actually runs the scenario.

Set the specified scenario as "Active".
This actually runs the scenario.
Set the specified scenario as " Active " . This actually runs the scenario .
fn activate_scenario(&self, id: &UnitName) -> Result<(), UnitActivateError> {
        let current_opt = self.current_scenario.borrow();
        match *current_opt {
            None => Err(UnitActivateError::UnitNotSelected),
            Some(ref s) => if s.borrow().id() != id {
                Err(UnitActivateError::UnitNotSelected)
            } else {
                // Activate this scenario.
                self.bc.broadcast(&UnitEvent::Log(LogEntry::new_info(id.clone(), format!("scenario starting"))));
                s.borrow_mut().activate(self, &*self.cfg.lock().unwrap())
            }
        }
    }
fn activate_scenario ( & self , id : & UnitName ) -> Result < ( ) , UnitActivateError > { let current_opt = self . current_scenario . borrow ( ) ; match * current_opt { None => Err ( UnitActivateError :: UnitNotSelected ) , Some ( ref s ) => if s . borrow ( ) . id ( ) != id { Err ( UnitActivateError :: UnitNotSelected ) } else { // Activate this scenario.
 self . bc . broadcast ( & UnitEvent :: Log ( LogEntry :: new_info ( id . clone ( ) , format ! ( " " ) ) ) ) ; s . borrow_mut ( ) . activate ( self , & * self . cfg . lock ( ) . unwrap ( ) ) } } }
Set the specified scenario as "Active".
Set the specified scenario as " Active " .
&self
id
&UnitName
&self
id
&UnitName