Make Rect<T> a struct tuple

It makes no sense to have named fields in some cases, notably to reuse
Rect<T> in BorderRadius<T>.
This commit is contained in:
Anthony Ramine 2017-05-27 10:32:49 +02:00
parent 4ec2e8b4c5
commit 4144dc74db
5 changed files with 41 additions and 55 deletions

View file

@ -901,8 +901,8 @@
% endif
})?;
Ok(expanded! {
% for side in ["top", "right", "bottom", "left"]:
${to_rust_ident(sub_property_pattern % side)}: rect.${side},
% for index, side in enumerate(["top", "right", "bottom", "left"]):
${to_rust_ident(sub_property_pattern % side)}: rect.${index},
% endfor
})
}