mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Generate PartialEq automatically
This commit is contained in:
parent
efb145e744
commit
99ac1a81cc
8 changed files with 6 additions and 42 deletions
|
@ -2339,6 +2339,12 @@ impl IDLInterface for %(name)s {
|
|||
%(check)s
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for %(name)s {
|
||||
fn eq(&self, other: &%(name)s) -> bool {
|
||||
self as *const %(name)s == &*other
|
||||
}
|
||||
}
|
||||
""" % {'check': check, 'name': name}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue