mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
clippy
This commit is contained in:
parent
0ad83fe990
commit
54429162ad
2 changed files with 2 additions and 3 deletions
|
@ -830,8 +830,8 @@ impl<
|
|||
layout: &Layout<'a>,
|
||||
fields: &'a [Symbol],
|
||||
) -> Result<(), String> {
|
||||
if let Layout::Struct(field_layouts) = layout {
|
||||
let struct_size = layout.stack_size(PTR_SIZE);
|
||||
if let Layout::Struct(field_layouts) = layout {
|
||||
if struct_size > 0 {
|
||||
let offset = self.claim_stack_size(struct_size)?;
|
||||
self.symbol_storage_map.insert(
|
||||
|
@ -862,7 +862,6 @@ impl<
|
|||
Ok(())
|
||||
} else {
|
||||
// This is a single element struct. Just copy the single field to the stack.
|
||||
let struct_size = layout.stack_size(PTR_SIZE);
|
||||
let offset = self.claim_stack_size(struct_size)?;
|
||||
self.symbol_storage_map.insert(
|
||||
*sym,
|
||||
|
|
|
@ -1004,7 +1004,7 @@ impl ModuleTiming {
|
|||
.checked_sub(*read_roc_file)
|
||||
};
|
||||
|
||||
calculate(end_time.duration_since(*start_time)).unwrap_or_else(Duration::default)
|
||||
calculate(end_time.duration_since(*start_time)).unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue