MCPcopy Index your code
hub / github.com/endbasic/endbasic / load

Method load

repl/src/editor.rs:529–536  ·  view source on GitHub ↗
(&mut self, name: Option<&str>, text: &str)

Source from the content-addressed store, hash-verified

527 }
528
529 fn load(&mut self, name: Option<&str>, text: &str) {
530 self.name = name.map(str::to_owned);
531 self.content = text.lines().map(LineBuffer::from).collect();
532 self.dirty = false;
533 self.viewport_pos = FilePos::default();
534 self.file_pos = FilePos::default();
535 self.insert_col = 0;
536 }
537
538 fn name(&self) -> Option<&str> {
539 self.name.as_deref()

Callers 4

run_from_storage_pathFunction · 0.45
run_editorFunction · 0.45
test_program_behaviorFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_program_behaviorFunction · 0.36