First part of Bus

This commit is contained in:
2022-02-19 11:13:27 -06:00
parent a721a7d0b8
commit fb8cee8d52
5 changed files with 150 additions and 30 deletions
+5
View File
@@ -24,6 +24,11 @@ impl std::ops::Sub<i32> for Word {
fn sub(self, rhs: i32) -> Self::Output { self + -rhs }
}
impl std::ops::Sub<Word> for Word {
type Output = Word;
fn sub(self, rhs: Word) -> Self::Output { Word(self.0 - rhs.0) }
}
impl std::ops::SubAssign<i32> for Word {
fn sub_assign(&mut self, rhs: i32) { *self = *self - rhs; }
}