diff options
author | Corey Farwell <coreyf@rwell.org> | 2015-03-29 13:33:02 -0400 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2015-03-29 14:42:19 -0400 |
commit | d838fcce30d56e02bd22c4bcfca04d39bf4fc38e (patch) | |
tree | 3a906417b1c164990bc308ff790913b9c7c08740 /components/script/dom/canvasgradient.rs | |
parent | b8ea10bfe3386357b68e5564332cf8ac9d5377bb (diff) | |
download | servo-d838fcce30d56e02bd22c4bcfca04d39bf4fc38e.tar.gz servo-d838fcce30d56e02bd22c4bcfca04d39bf4fc38e.zip |
Remove some unnecessary uses of `as_slice`
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:
* `String` -> `str`
* `Atom` -> `str`
The latter of those two requires, a bump of the locked `string-cache`
library
Diffstat (limited to 'components/script/dom/canvasgradient.rs')
-rw-r--r-- | components/script/dom/canvasgradient.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/canvasgradient.rs b/components/script/dom/canvasgradient.rs index 349d434114c..2b193697124 100644 --- a/components/script/dom/canvasgradient.rs +++ b/components/script/dom/canvasgradient.rs @@ -52,7 +52,7 @@ impl<'a> CanvasGradientMethods for JSRef<'a, CanvasGradient> { self.stops.borrow_mut().push(CanvasGradientStop { offset: (*offset) as f64, - color: parse_color(color.as_slice()).unwrap_or(default_black), + color: parse_color(&color).unwrap_or(default_black), }); } } |