mirror of
https://github.com/servo/servo
synced 2026-05-02 04:17:38 +02:00
script: to_string() -> into_string()
This commit is contained in:
committed by
Ms2ger
parent
475ff4dcb7
commit
e9d1740e19
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user