Fix clippy warnings.

This commit fixes the current set of (stable) clippy warnings in the repo.
This commit is contained in:
Peter Huene
2019-10-23 23:15:42 -07:00
committed by Andrew Brown
parent 1176e4f178
commit 9f506692c2
93 changed files with 667 additions and 662 deletions

View File

@@ -16,14 +16,14 @@ impl Variable {
/// Create a new Variable with the given index.
pub fn with_u32(index: u32) -> Self {
debug_assert!(index < u32::MAX);
Variable(index)
Self(index)
}
}
impl EntityRef for Variable {
fn new(index: usize) -> Self {
debug_assert!(index < (u32::MAX as usize));
Variable(index as u32)
Self(index as u32)
}
fn index(self) -> usize {