aml: make constructor field order consistent

On nightly, clippy expects the structs to be constructed with fields in
the same order they're declared in. Seems sensible enough, so let's do
that.

Signed-off-by: Gaelan Steele <gbs@canishe.com>
This commit is contained in:
Gaelan Steele 2021-03-28 23:07:03 -07:00 committed by Sebastien Boeuf
parent 8876e0f575
commit d8e1898b46

View File

@ -732,9 +732,9 @@ impl Field {
) -> Self { ) -> Self {
Field { Field {
path, path,
fields,
access_type, access_type,
update_rule, update_rule,
fields,
} }
} }
} }
@ -851,8 +851,8 @@ impl<'a> Aml for If<'a> {
} }
pub struct Equal<'a> { pub struct Equal<'a> {
right: &'a dyn Aml,
left: &'a dyn Aml, left: &'a dyn Aml,
right: &'a dyn Aml,
} }
impl<'a> Equal<'a> { impl<'a> Equal<'a> {
@ -871,8 +871,8 @@ impl<'a> Aml for Equal<'a> {
} }
pub struct LessThan<'a> { pub struct LessThan<'a> {
right: &'a dyn Aml,
left: &'a dyn Aml, left: &'a dyn Aml,
right: &'a dyn Aml,
} }
impl<'a> LessThan<'a> { impl<'a> LessThan<'a> {
@ -1056,7 +1056,7 @@ macro_rules! binary_op {
impl<'a> $name<'a> { impl<'a> $name<'a> {
pub fn new(target: &'a dyn Aml, a: &'a dyn Aml, b: &'a dyn Aml) -> Self { pub fn new(target: &'a dyn Aml, a: &'a dyn Aml, b: &'a dyn Aml) -> Self {
$name { target, a, b } $name { a, b, target }
} }
} }