mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41: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>,
|
layout: &Layout<'a>,
|
||||||
fields: &'a [Symbol],
|
fields: &'a [Symbol],
|
||||||
) -> Result<(), String> {
|
) -> Result<(), String> {
|
||||||
|
let struct_size = layout.stack_size(PTR_SIZE);
|
||||||
if let Layout::Struct(field_layouts) = layout {
|
if let Layout::Struct(field_layouts) = layout {
|
||||||
let struct_size = layout.stack_size(PTR_SIZE);
|
|
||||||
if struct_size > 0 {
|
if struct_size > 0 {
|
||||||
let offset = self.claim_stack_size(struct_size)?;
|
let offset = self.claim_stack_size(struct_size)?;
|
||||||
self.symbol_storage_map.insert(
|
self.symbol_storage_map.insert(
|
||||||
|
@ -862,7 +862,6 @@ impl<
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
// This is a single element struct. Just copy the single field to the stack.
|
// 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)?;
|
let offset = self.claim_stack_size(struct_size)?;
|
||||||
self.symbol_storage_map.insert(
|
self.symbol_storage_map.insert(
|
||||||
*sym,
|
*sym,
|
||||||
|
|
|
@ -1004,7 +1004,7 @@ impl ModuleTiming {
|
||||||
.checked_sub(*read_roc_file)
|
.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