diff --git a/components/style/gecko_bindings/nsstring_vendor/src/lib.rs b/components/style/gecko_bindings/nsstring_vendor/src/lib.rs index 5cbcd5998ac..26975ae9a28 100644 --- a/components/style/gecko_bindings/nsstring_vendor/src/lib.rs +++ b/components/style/gecko_bindings/nsstring_vendor/src/lib.rs @@ -988,7 +988,7 @@ impl From for nsCString { // Support for the write!() macro for appending to nsACStrings impl fmt::Write for nsACString { fn write_str(&mut self, s: &str) -> Result<(), fmt::Error> { - self.append(&nsCString::from(s)); + self.append(s); Ok(()) } } @@ -1106,7 +1106,7 @@ impl fmt::Write for nsAString { fn write_str(&mut self, s: &str) -> Result<(), fmt::Error> { // Directly invoke gecko's routines for appending utf8 strings to // nsAString values, to avoid as much overhead as possible - self.append_utf8(&nsCString::from(s)); + self.append_utf8(s); Ok(()) } }