diff --git a/plotly/src/layout/update_menu.rs b/plotly/src/layout/update_menu.rs index 4823385e..eea463f0 100644 --- a/plotly/src/layout/update_menu.rs +++ b/plotly/src/layout/update_menu.rs @@ -100,7 +100,7 @@ impl ButtonBuilder { pub fn new() -> Self { Default::default() } - pub fn push_restyle(mut self, restyle: impl Restyle + Serialize) -> Self { + pub fn push_restyle(mut self, restyle: impl Restyle) -> Self { let restyle = serde_json::to_value(&restyle).unwrap(); for (k, v) in restyle.as_object().unwrap() { self.restyles.insert(k.clone(), v.clone()); diff --git a/plotly/src/plot.rs b/plotly/src/plot.rs index a7d175ea..a2dab216 100644 --- a/plotly/src/plot.rs +++ b/plotly/src/plot.rs @@ -20,6 +20,7 @@ struct PlotTemplate<'a> { #[derive(Template)] #[template(path = "static_plot.html", escape = "none")] +#[cfg(not(target_family = "wasm"))] struct StaticPlotTemplate<'a> { plot: &'a Plot, format: ImageFormat,