1
0
forked from Rativel/BurritOS

♻️ Removed tons of casts to usize

This commit is contained in:
François Autin
2023-03-24 18:20:59 +01:00
parent 35fdb1e0b0
commit 7bdde70989
2 changed files with 71 additions and 71 deletions

View File

@@ -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; }
}