Merge pull request #2 from leejseo/main

Fix typo
This commit is contained in:
Jeehoon Kang
2022-08-30 16:01:42 +09:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ pub(crate) fn add(lhs: usize, rhs: usize) -> usize {
todo!()
}
/// Adds two unsigned words. If underflow happens, just wrap around.
/// Subtracts two unsigned words. If overflow happens, just wrap around.
pub(crate) fn sub(lhs: usize, rhs: usize) -> usize {
todo!()
}

View File

@@ -18,7 +18,7 @@ mod test {
}
#[test]
fn sub_underflow() {
fn sub_overflow() {
assert_eq!(sub(usize::MIN, 1), usize::MAX);
}
}