diff --git a/agb/src/save/eeprom.rs b/agb/src/save/eeprom.rs index d2f7258a..6511b201 100644 --- a/agb/src/save/eeprom.rs +++ b/agb/src/save/eeprom.rs @@ -61,14 +61,14 @@ impl BufferData { /// Reads a number from the input buffer. fn read_num(&mut self, off: usize, count: usize) -> u32 { - let mut accum = 0; + let mut accumulator = 0; unsafe { for i in 0..count { - accum <<= 1; - accum |= self.data.bits[off + i] as u32; + accumulator <<= 1; + accumulator |= self.data.bits[off + i] as u32; } } - accum + accumulator } /// Receives a number of words into the input buffer. diff --git a/agb/src/save/mod.rs b/agb/src/save/mod.rs index 78041dce..b240efad 100644 --- a/agb/src/save/mod.rs +++ b/agb/src/save/mod.rs @@ -44,8 +44,8 @@ //! [`SaveManager::access_with_timer`] methods to create a new [`SaveData`] //! object. Its methods are used to read or write save media. //! -//! Reading data from the savegame is simple. Use [`read`] to copy data from an -//! offset in the savegame into a buffer in memory. +//! Reading data from the save media is simple. Use [`read`] to copy data from an +//! offset in the save media into a buffer in memory. //! //! Writing to save media requires you to prepare the area for writing by //! calling the [`prepare_write`] method to return a [`SavePreparedBlock`], @@ -185,7 +185,7 @@ fn set_save_implementation(access_impl: &'static dyn RawSaveAccess) { let mut access = CURRENT_SAVE_ACCESS.lock(); assert!( access.is_none(), - "Cannot initialize the savegame engine more than once." + "Cannot initialize the save media engine more than once." ); *access = Some(access_impl); } @@ -202,7 +202,7 @@ pub struct SaveData { timeout: utils::Timeout, } impl SaveData { - /// Creates a new save accessor around the current save implementaiton. + /// Creates a new save accessor around the current save implementation. fn new(timer: Option) -> Result { match get_save_implementation() { Some(access) => Ok(SaveData {