Auto merge of #23832 - petrochenkov:usize, r=aturon
These constants are small and can fit even in `u8`, but semantically they have type `usize` because they denote sizes and are almost always used in `usize` context. The change of their type to `u32` during the integer audit led only to the large amount of `as usize` noise (see the second commit, which removes this noise). This is a minor [breaking-change] to an unstable interface. r? @aturon
This commit is contained in:
commit
fc98b19cf7
14 changed files with 86 additions and 86 deletions
|
|
@ -86,9 +86,9 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_count_zeros() {
|
||||
assert!(A.count_zeros() == BITS - 3);
|
||||
assert!(B.count_zeros() == BITS - 2);
|
||||
assert!(C.count_zeros() == BITS - 5);
|
||||
assert!(A.count_zeros() == BITS as u32 - 3);
|
||||
assert!(B.count_zeros() == BITS as u32 - 2);
|
||||
assert!(C.count_zeros() == BITS as u32 - 5);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_count_zeros() {
|
||||
assert!(A.count_zeros() == BITS - 3);
|
||||
assert!(B.count_zeros() == BITS - 2);
|
||||
assert!(C.count_zeros() == BITS - 5);
|
||||
assert!(A.count_zeros() == BITS as u32 - 3);
|
||||
assert!(B.count_zeros() == BITS as u32 - 2);
|
||||
assert!(C.count_zeros() == BITS as u32 - 5);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue