mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
do what clippy wants
This commit is contained in:
parent
2bad39e8b9
commit
5237408b15
4 changed files with 7 additions and 8 deletions
|
@ -265,12 +265,10 @@ fn layout_from_flat_type<'a>(
|
|||
}
|
||||
} else {
|
||||
// up to 256 enum tags can be stored in a byte
|
||||
let mut counter = 0u8;
|
||||
let mut tag_to_u8 = MutMap::default();
|
||||
|
||||
for (name, _) in tags {
|
||||
tag_to_u8.insert(name, counter);
|
||||
counter += 1;
|
||||
for (counter, (name, _)) in tags.into_iter().enumerate() {
|
||||
tag_to_u8.insert(name, counter as u8);
|
||||
}
|
||||
Ok(Layout::Builtin(Builtin::Byte(tag_to_u8)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue