mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
script: to_string() -> into_string()
This commit is contained in:
parent
475ff4dcb7
commit
e9d1740e19
39 changed files with 152 additions and 152 deletions
|
@ -679,7 +679,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
|||
default = "None"
|
||||
else:
|
||||
assert defaultValue.type.tag() == IDLType.Tags.domstring
|
||||
value = "str::from_utf8(data).unwrap().to_string()"
|
||||
value = "str::from_utf8(data).unwrap().into_string()"
|
||||
if type.nullable():
|
||||
value = "Some(%s)" % value
|
||||
|
||||
|
@ -2778,7 +2778,7 @@ pub const strings: &'static [&'static str] = &[
|
|||
|
||||
impl ToJSValConvertible for super::%s {
|
||||
fn to_jsval(&self, cx: *mut JSContext) -> JSVal {
|
||||
strings[*self as uint].to_string().to_jsval(cx)
|
||||
strings[*self as uint].into_string().to_jsval(cx)
|
||||
}
|
||||
}
|
||||
""" % (",\n ".join(['"%s"' % val for val in enum.values()]), enum.identifier.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue