diff --git a/server/src/lib.rs b/server/src/lib.rs index ac854af..c7e3f80 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -140,29 +140,6 @@ impl Transformer for StripHtml { } } -struct InlineRemoteStyle<'a> { - base_url: &'a Option, -} - -#[async_trait] -impl<'a> Transformer for InlineRemoteStyle<'a> { - async fn transform(&self, _: &Option, html: &str) -> Result { - //info!("HTML:\n{html}"); - Ok( - match CSSInliner::options() - .base_url(self.base_url.clone()) - .build() - .inline(&html) - { - Ok(inlined_html) => inlined_html, - Err(err) => { - error!("failed to inline remote CSS: {err}"); - html.to_string() - } - }, - ) - } -} struct InlineStyle; #[async_trait] diff --git a/web/src/state.rs b/web/src/state.rs index cd147b5..c2e53e0 100644 --- a/web/src/state.rs +++ b/web/src/state.rs @@ -496,10 +496,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders) { } Msg::MultiMsg(msgs) => msgs.into_iter().for_each(|msg| update(msg, model, orders)), Msg::CopyToClipboard(text) => { - let clipboard = seed::window() - .navigator() - .clipboard() - .expect("couldn't get clipboard"); + let clipboard = seed::window().navigator().clipboard(); orders.perform_cmd(async move { wasm_bindgen_futures::JsFuture::from(clipboard.write_text(&text)) .await