(&mut self, offset: i32)
| 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 | } |
no test coverage detected