aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/encoding_support.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-06-23 19:57:44 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-06-23 20:34:10 +0200
commit26720e10a96fea750f3f83ea37787bdd240b910d (patch)
tree40c423ba095a3d0723c8422c466a1b6bcab15253 /components/style/encoding_support.rs
parent82db42390d1d95b99ea181456e2caa9882dc03c6 (diff)
downloadservo-26720e10a96fea750f3f83ea37787bdd240b910d.tar.gz
servo-26720e10a96fea750f3f83ea37787bdd240b910d.zip
style: Fix servo build.
Diffstat (limited to 'components/style/encoding_support.rs')
-rw-r--r--components/style/encoding_support.rs17
1 files changed, 6 insertions, 11 deletions
diff --git a/components/style/encoding_support.rs b/components/style/encoding_support.rs
index eadcfa4c159..7aec18bee2c 100644
--- a/components/style/encoding_support.rs
+++ b/components/style/encoding_support.rs
@@ -55,7 +55,7 @@ impl Stylesheet {
///
/// Takes care of decoding the network bytes and forwards the resulting
/// string to `Stylesheet::from_str`.
- pub fn from_bytes<R>(
+ pub fn from_bytes(
bytes: &[u8],
url_data: UrlExtraData,
protocol_encoding_label: Option<&str>,
@@ -64,12 +64,9 @@ impl Stylesheet {
media: MediaList,
shared_lock: SharedRwLock,
stylesheet_loader: Option<&StylesheetLoader>,
- error_reporter: &R,
+ error_reporter: Option<&ParseErrorReporter>,
quirks_mode: QuirksMode,
- ) -> Stylesheet
- where
- R: ParseErrorReporter,
- {
+ ) -> Stylesheet {
let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding);
Stylesheet::from_str(
&string,
@@ -86,17 +83,15 @@ impl Stylesheet {
/// Updates an empty stylesheet with a set of bytes that reached over the
/// network.
- pub fn update_from_bytes<R>(
+ pub fn update_from_bytes(
existing: &Stylesheet,
bytes: &[u8],
protocol_encoding_label: Option<&str>,
environment_encoding: Option<&'static encoding_rs::Encoding>,
url_data: UrlExtraData,
stylesheet_loader: Option<&StylesheetLoader>,
- error_reporter: &R,
- ) where
- R: ParseErrorReporter,
- {
+ error_reporter: Option<&ParseErrorReporter>,
+ ) {
let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding);
Self::update_from_str(
existing,