Replace as casts with type-conversion functions.

This commit is contained in:
Dan Gohman
2017-11-08 10:41:09 -08:00
parent 7c579a80c2
commit 889b06fd16
15 changed files with 54 additions and 47 deletions

View File

@@ -78,6 +78,7 @@ where
#[cfg(test)]
mod tests {
use super::*;
use std::u32;
// `EntityRef` impl for testing.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
@@ -133,7 +134,7 @@ mod tests {
assert!(!m.contains(E(16)));
assert!(!m.contains(E(19)));
assert!(!m.contains(E(20)));
assert!(!m.contains(E(u32::max_value())));
assert!(!m.contains(E(u32::MAX)));
m.clear();
assert!(m.is_empty());