MCPcopy Index your code
hub / github.com/RustOtomeLab/RustEng / set_offset

Method set_offset

src/script.rs:94–99  ·  view source on GitHub ↗
(&mut self, offset: i32)

Source from the content-addressed store, hash-verified

92 let max_offset = self.max_offset();
93 self.backlog_offset = new_offset.min(max_offset as i32) as usize;
94 }
95
96 fn max_offset(&self) -> usize {
97 self.backlog.len().saturating_sub(WINDOW_SIZE)
98 }
99
100 pub(crate) fn set_current_bgm(&mut self, bgm: String) {
101 self.current_bgm = bgm;
102 }

Callers 1

Calls 1

max_offsetMethod · 0.80

Tested by

no test coverage detected