script: to_string() -> into_string()

This commit is contained in:
Manish Goregaokar 2014-12-14 04:16:34 +05:30 committed by Ms2ger
parent 475ff4dcb7
commit e9d1740e19
39 changed files with 152 additions and 152 deletions

View file

@ -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)