Use a slice over a Vec arg

This commit is contained in:
Richard Feldman 2022-05-03 18:01:09 -04:00
parent abf2c89f7a
commit f3f5fcad98
No known key found for this signature in database
GPG Key ID: 7E4127D1E4241798

View File

@ -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);