mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Remove usage of String::from_str, deprecated in #6377
This commit is contained in:
parent
24af4c4ec6
commit
5428226e04
6 changed files with 11 additions and 13 deletions
|
@ -211,7 +211,7 @@ impl<'a> CSSStyleDeclarationMethods for JSRef<'a, CSSStyleDeclaration> {
|
|||
}
|
||||
|
||||
// Step 6
|
||||
let mut synthesized_declaration = String::from_str(&property);
|
||||
let mut synthesized_declaration = property;
|
||||
synthesized_declaration.push_str(": ");
|
||||
synthesized_declaration.push_str(&value);
|
||||
|
||||
|
|
|
@ -101,10 +101,10 @@ impl<'a> WebGLRenderingContextMethods for JSRef<'a, WebGLRenderingContext> {
|
|||
// TODO(ecoal95): Implement the missing parameters from the spec
|
||||
match parameter {
|
||||
WebGLRenderingContextConstants::VERSION =>
|
||||
DOMString::from_str("WebGL 1.0").to_jsval(cx),
|
||||
"WebGL 1.0".to_jsval(cx),
|
||||
WebGLRenderingContextConstants::RENDERER |
|
||||
WebGLRenderingContextConstants::VENDOR =>
|
||||
DOMString::from_str("Mozilla/Servo").to_jsval(cx),
|
||||
"Mozilla/Servo".to_jsval(cx),
|
||||
_ => NullValue(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1038,7 +1038,7 @@ fn should_move_clip_rect(clip_rect: Rect<Au>, new_viewport: Rect<f32>) -> bool{
|
|||
}
|
||||
|
||||
fn debug_reflow_events(goal: &ReflowGoal, query_type: &ReflowQueryType, reason: &ReflowReason) {
|
||||
let mut debug_msg = String::from_str("****");
|
||||
let mut debug_msg = "****".to_owned();
|
||||
debug_msg.push_str(match *goal {
|
||||
ReflowGoal::ForDisplay => "\tForDisplay",
|
||||
ReflowGoal::ForScriptQuery => "\tForScriptQuery",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue