mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 00:09:33 +03:00
Use a slice over a Vec arg
This commit is contained in:
parent
abf2c89f7a
commit
f3f5fcad98
@ -76,7 +76,7 @@ impl RocRecord {
|
||||
}
|
||||
|
||||
/// Use struct ordering, taking into account alignment and alphabetization.
|
||||
fn use_struct_ordering(fields: &mut Vec<(String, Box<RocType>)>, ptr_alignment: usize) {
|
||||
fn use_struct_ordering(fields: &mut [(String, Box<RocType>)], ptr_alignment: usize) {
|
||||
fields.sort_by(|(field1, type1), (field2, type2)| {
|
||||
let align1 = type1.alignment(ptr_alignment);
|
||||
let align2 = type2.alignment(ptr_alignment);
|
||||
|
Loading…
Reference in New Issue
Block a user