File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ struct UrlError(url::ParseError);
17
17
18
18
impl From < UrlError > for JsValue {
19
19
fn from ( error : UrlError ) -> Self {
20
- wasm_bindgen :: throw_str ( & error. 0 . to_string ( ) )
20
+ JsValue :: from_str ( & error. 0 . to_string ( ) . as_str ( ) )
21
21
}
22
22
}
23
23
@@ -34,7 +34,7 @@ extern crate serde_derive;
34
34
35
35
#[ derive( Deserialize ) ]
36
36
#[ serde( default ) ]
37
- pub struct Options {
37
+ struct Options {
38
38
inline_style_tags : bool ,
39
39
remove_style_tags : bool ,
40
40
base_url : Option < String > ,
@@ -79,7 +79,7 @@ impl TryFrom<Options> for rust_inline::InlineOptions<'_> {
79
79
#[ wasm_bindgen]
80
80
pub fn inline (
81
81
html : & str ,
82
- options : JsValue ,
82
+ options : & JsValue ,
83
83
) -> Result < String , JsValue > {
84
84
let options: Options = if !options. is_undefined ( ) {
85
85
options. into_serde ( ) . map_err ( SerdeError ) ?
You can’t perform that action at this time.
0 commit comments