MCPcopy Create free account
hub / github.com/RustOtomeLab/RustEng / execute_choose

Method execute_choose

src/executors/executor.rs:276–304  ·  view source on GitHub ↗
(&mut self, choice: SharedString)

Source from the content-addressed store, hash-verified

274 .map_err(SaveError::from)?,
275 )
276 .map_err(|e| SaveError::Write {
277 path: path.clone(),
278 source: e,
279 })?;
280 window.set_save_items(exists_save_items);
281 }
282
283 Ok(())
284 }
285
286 pub(crate) fn execute_load(&mut self, name: String, index: i32) -> Result<(), EngineError> {
287 if !name.is_empty() {
288 let weak = self.weak.clone();
289 *self.choose_lock.borrow_mut() = false;
290 if let Some(window) = weak.upgrade() {
291 window.set_current_screen(2);
292 window.set_current_choose(0);
293 }
294 self.execute_jump(Jump::Index((name, index - 1)))?;
295 self.execute_script()?;
296 }
297
298 Ok(())
299 }
300
301 pub(crate) fn execute_get_ex(&self) -> Result<(), EngineError> {
302 let ex_items = get_cg(&self.user_data.borrow().cg)?;
303
304 if let Some(window) = self.weak.upgrade() {
305 window.set_ex_items(ex_items);
306 }
307

Callers 1

uiFunction · 0.80

Calls 2

get_choice_labelMethod · 0.80
execute_jumpMethod · 0.80

Tested by

no test coverage detected