mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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.
This commit is contained in:
parent
15e76eb6e2
commit
c37ab1facd
3 changed files with 6 additions and 8 deletions
|
@ -38,7 +38,7 @@ lazy_static! {
|
|||
// FIXME: presentational-hints.css should be at author origin with zero specificity.
|
||||
// (Does it make a difference?)
|
||||
for &filename in &["user-agent.css", "servo.css", "presentational-hints.css"] {
|
||||
match read_resource_file(&[filename]) {
|
||||
match read_resource_file(filename) {
|
||||
Ok(res) => {
|
||||
let ua_stylesheet = Stylesheet::from_bytes(
|
||||
&res,
|
||||
|
@ -65,7 +65,7 @@ lazy_static! {
|
|||
|
||||
lazy_static! {
|
||||
pub static ref QUIRKS_MODE_STYLESHEET: Stylesheet<ServoSelectorImpl> = {
|
||||
match read_resource_file(&["quirks-mode.css"]) {
|
||||
match read_resource_file("quirks-mode.css") {
|
||||
Ok(res) => {
|
||||
Stylesheet::from_bytes(
|
||||
&res,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue