more clippy things

This commit is contained in:
Folkert 2020-10-17 23:03:15 +02:00
parent 1439c1a21d
commit e9d9c9acc2
2 changed files with 3 additions and 6 deletions

View file

@ -57,7 +57,7 @@ impl<'a> ClosureLayout<'a> {
}
}
fn from_unwrapped(layouts: &'a [Layout<'a>]) -> Self {
debug_assert!(layouts.len() > 0);
debug_assert!(!layouts.is_empty());
ClosureLayout {
captured: layouts,
max_size: layouts,
@ -102,7 +102,7 @@ impl<'a> ClosureLayout<'a> {
}
}
pub fn into_block_of_memory_layout(&self) -> Layout<'a> {
pub fn as_block_of_memory_layout(&self) -> Layout<'a> {
Layout::Struct(self.max_size)
}
}