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
This commit is contained in:
Corey Farwell 2015-03-29 13:33:02 -04:00
parent b8ea10bfe3
commit d838fcce30
19 changed files with 98 additions and 102 deletions

4
ports/cef/Cargo.lock generated
View file

@ -840,7 +840,7 @@ source = "git+https://github.com/servo/rust-stb-image#b683cc9e7ba52a1bb65361347d
[[package]]
name = "string_cache"
version = "0.0.0"
source = "git+https://github.com/servo/string-cache#8c05fdf456a0e4f884e85d7e3a7700b2e4ca91eb"
source = "git+https://github.com/servo/string-cache#124cb555651bd7838c5c6dc4788bc4f5350947a9"
dependencies = [
"lazy_static 0.1.8 (git+https://github.com/Kimundi/lazy-static.rs)",
"phf 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
@ -852,7 +852,7 @@ dependencies = [
[[package]]
name = "string_cache_plugin"
version = "0.0.0"
source = "git+https://github.com/servo/string-cache#8c05fdf456a0e4f884e85d7e3a7700b2e4ca91eb"
source = "git+https://github.com/servo/string-cache#124cb555651bd7838c5c6dc4788bc4f5350947a9"
dependencies = [
"lazy_static 0.1.8 (git+https://github.com/Kimundi/lazy-static.rs)",
"mac 0.0.2 (git+https://github.com/reem/rust-mac)",

6
ports/gonk/Cargo.lock generated
View file

@ -13,6 +13,7 @@ dependencies = [
"libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net 0.0.1",
"profile 0.0.1",
"script 0.0.1",
"servo 0.0.1",
"time 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)",
@ -763,7 +764,7 @@ source = "git+https://github.com/servo/rust-stb-image#b683cc9e7ba52a1bb65361347d
[[package]]
name = "string_cache"
version = "0.0.0"
source = "git+https://github.com/servo/string-cache#8c05fdf456a0e4f884e85d7e3a7700b2e4ca91eb"
source = "git+https://github.com/servo/string-cache#124cb555651bd7838c5c6dc4788bc4f5350947a9"
dependencies = [
"lazy_static 0.1.8 (git+https://github.com/Kimundi/lazy-static.rs)",
"phf 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
@ -775,7 +776,7 @@ dependencies = [
[[package]]
name = "string_cache_plugin"
version = "0.0.0"
source = "git+https://github.com/servo/string-cache#8c05fdf456a0e4f884e85d7e3a7700b2e4ca91eb"
source = "git+https://github.com/servo/string-cache#124cb555651bd7838c5c6dc4788bc4f5350947a9"
dependencies = [
"lazy_static 0.1.8 (git+https://github.com/Kimundi/lazy-static.rs)",
"mac 0.0.2 (git+https://github.com/reem/rust-mac)",
@ -838,6 +839,7 @@ dependencies = [
name = "util"
version = "0.0.1"
dependencies = [
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
"bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.2.0 (git+https://github.com/servo/rust-cssparser)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",