chore: replace pub with pub(crate) when possible

This commit is contained in:
2021-06-06 19:14:28 -05:00
parent b7b213b6b9
commit 878edd4082
15 changed files with 196 additions and 192 deletions

View File

@@ -2,7 +2,7 @@ const HIGH_RAM_SIZE: usize = 0x7F;
const HIGH_RAM_START_ADDRESS: usize = 0xFF80;
#[derive(Debug, Clone)]
pub struct HighRam {
pub(crate) struct HighRam {
buf: Box<[u8; HIGH_RAM_SIZE]>,
}
@@ -15,11 +15,11 @@ impl Default for HighRam {
}
impl HighRam {
pub fn write_byte(&mut self, addr: u16, byte: u8) {
pub(crate) fn write_byte(&mut self, addr: u16, byte: u8) {
self.buf[addr as usize - HIGH_RAM_START_ADDRESS] = byte;
}
pub fn read_byte(&self, addr: u16) -> u8 {
pub(crate) fn read_byte(&self, addr: u16) -> u8 {
self.buf[addr as usize - HIGH_RAM_START_ADDRESS]
}
}