diff options
author | Corey Farwell <coreyf@rwell.org> | 2016-04-16 23:06:59 -0400 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2016-04-16 23:06:59 -0400 |
commit | c37ab1facdb3639eaa8b58894a26b31db43004d7 (patch) | |
tree | 4c9cb6bd6a9e9bf03e2f16d270991e15d0e06132 /components/net/hsts.rs | |
parent | 15e76eb6e2c00ba26b65df73f1954ccada7509cf (diff) | |
download | servo-c37ab1facdb3639eaa8b58894a26b31db43004d7.tar.gz servo-c37ab1facdb3639eaa8b58894a26b31db43004d7.zip |
Make `read_resource_file` param simpler and more idiomatic.
`<P: AsRef<Path>>` is also what `File::open` uses as a generic type for
the parameter.
Diffstat (limited to 'components/net/hsts.rs')
-rw-r--r-- | components/net/hsts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/net/hsts.rs b/components/net/hsts.rs index 795c1cae079..336b66bf0a7 100644 --- a/components/net/hsts.rs +++ b/components/net/hsts.rs @@ -112,7 +112,7 @@ impl HSTSList { } pub fn preload_hsts_domains() -> Option<HSTSList> { - read_resource_file(&["hsts_preload.json"]).ok().and_then(|bytes| { + read_resource_file("hsts_preload.json").ok().and_then(|bytes| { from_utf8(&bytes).ok().and_then(|hsts_preload_content| { HSTSList::new_from_preload(hsts_preload_content) }) |