mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Remove a useless level of indirection in gecko.mako.rs
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
6139f8175c
commit
0c2ebcbd1f
1 changed files with 2 additions and 8 deletions
|
@ -1140,8 +1140,9 @@ impl Clone for ${style_struct.gecko_struct_name} {
|
|||
}
|
||||
</%def>
|
||||
|
||||
<%def name="raw_impl_trait(style_struct, skip_longhands='', skip_additionals='')">
|
||||
<%def name="impl_trait(style_struct_name, skip_longhands='', skip_additionals='')">
|
||||
<%
|
||||
style_struct = next(x for x in data.style_structs if x.name == style_struct_name)
|
||||
longhands = [x for x in style_struct.longhands
|
||||
if not (skip_longhands == "*" or x.name in skip_longhands.split())]
|
||||
|
||||
|
@ -1274,13 +1275,6 @@ impl ${style_struct.gecko_struct_name} {
|
|||
}
|
||||
</%def>
|
||||
|
||||
<%def name="impl_trait(style_struct_name, skip_longhands='', skip_additionals='')">
|
||||
<%self:raw_impl_trait style_struct="${next(x for x in data.style_structs if x.name == style_struct_name)}"
|
||||
skip_longhands="${skip_longhands}" skip_additionals="${skip_additionals}">
|
||||
${caller.body()}
|
||||
</%self:raw_impl_trait>
|
||||
</%def>
|
||||
|
||||
<%!
|
||||
class Side(object):
|
||||
def __init__(self, name, index):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue