aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-01-03 18:07:09 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2016-01-03 18:07:09 +0100
commit99ac1a81cca4e72e69a7cbe54d23b9d30431d2b3 (patch)
tree6890d15f17526a511766cf3e87a963d40146c7df /components/script/dom/bindings/codegen/CodegenRust.py
parentefb145e74498529dff58742595098c0b40618f7f (diff)
downloadservo-99ac1a81cca4e72e69a7cbe54d23b9d30431d2b3.tar.gz
servo-99ac1a81cca4e72e69a7cbe54d23b9d30431d2b3.zip
Generate PartialEq automatically
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index b46f127253b..3161d3754c9 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -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}