forked from Rativel/BurritOS
♻️ Removed tons of casts to usize
This commit is contained in:
@@ -26,8 +26,8 @@ impl<U: RegisterNum> Register<U> {
|
||||
///
|
||||
/// Checking against trying to set a new value to the 0th register
|
||||
/// as its value is NOT supposed to change
|
||||
pub fn set_reg(&mut self, position: usize, value: U) {
|
||||
if position != 0 { self.register[position] = value; }
|
||||
pub fn set_reg(&mut self, position: u8, value: U) {
|
||||
if position != 0 { self.register[position as usize] = value; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user