mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove as_slice() calls from script.
This commit is contained in:
parent
ef536372cd
commit
a862479ca8
42 changed files with 115 additions and 124 deletions
|
@ -168,7 +168,7 @@ impl<'a> HTMLCanvasElementMethods for JSRef<'a, HTMLCanvasElement> {
|
|||
}
|
||||
|
||||
fn GetContext(self, id: DOMString) -> Option<CanvasRenderingContext2DOrWebGLRenderingContext> {
|
||||
match id.as_slice() {
|
||||
match &*id {
|
||||
"2d" => {
|
||||
let context_2d = self.context_2d.or_init(|| {
|
||||
let window = window_from_node(self).root();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue