mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Remove unused lifetime parameters to dictionaries.
They were used for Root members, but those no longer use lifetimes.
This commit is contained in:
parent
d7e9b8b96b
commit
b213a80f80
1 changed files with 6 additions and 6 deletions
|
@ -4362,8 +4362,8 @@ class CGDictionary(CGThing):
|
|||
def struct(self):
|
||||
d = self.dictionary
|
||||
if d.parent:
|
||||
inheritance = " pub parent: %s::%s<'a, 'b>,\n" % (self.makeModuleName(d.parent),
|
||||
self.makeClassName(d.parent))
|
||||
inheritance = " pub parent: %s::%s,\n" % (self.makeModuleName(d.parent),
|
||||
self.makeClassName(d.parent))
|
||||
else:
|
||||
inheritance = ""
|
||||
memberDecls = [" pub %s: %s," %
|
||||
|
@ -4371,7 +4371,7 @@ class CGDictionary(CGThing):
|
|||
for m in self.memberInfo]
|
||||
|
||||
return (string.Template(
|
||||
"pub struct ${selfName}<'a, 'b> {\n" +
|
||||
"pub struct ${selfName} {\n" +
|
||||
"${inheritance}" +
|
||||
"\n".join(memberDecls) + "\n" +
|
||||
"}").substitute( { "selfName": self.makeClassName(d),
|
||||
|
@ -4395,11 +4395,11 @@ class CGDictionary(CGThing):
|
|||
memberInits = CGList([memberInit(m) for m in self.memberInfo])
|
||||
|
||||
return string.Template(
|
||||
"impl<'a, 'b> ${selfName}<'a, 'b> {\n"
|
||||
" pub fn empty() -> ${selfName}<'a, 'b> {\n"
|
||||
"impl ${selfName} {\n"
|
||||
" pub fn empty() -> ${selfName} {\n"
|
||||
" ${selfName}::new(ptr::null_mut(), NullValue()).unwrap()\n"
|
||||
" }\n"
|
||||
" pub fn new(cx: *mut JSContext, val: JSVal) -> Result<${selfName}<'a, 'b>, ()> {\n"
|
||||
" pub fn new(cx: *mut JSContext, val: JSVal) -> Result<${selfName}, ()> {\n"
|
||||
" let object = if val.is_null_or_undefined() {\n"
|
||||
" ptr::null_mut()\n"
|
||||
" } else if val.is_object() {\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue