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

@ -3016,10 +3016,7 @@ pub fn from_can<'a>(
env.arena, env.arena,
); );
temp.push(closure_data_layout.clone()); temp.push(closure_data_layout.clone());
Layout::FunctionPointer( Layout::FunctionPointer(temp.into_bump_slice(), ret_layout)
temp.into_bump_slice(),
ret_layout.clone(),
)
}; };
let full_layout = function_ptr_layout.clone(); let full_layout = function_ptr_layout.clone();

View file

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