mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
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:
parent
4ec2e8b4c5
commit
4144dc74db
5 changed files with 41 additions and 55 deletions
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue