From 33df58eda9a1b21605e11b06e1b290af88f058a1 Mon Sep 17 00:00:00 2001 From: James Lindsay <78500760+0HyperCube@users.noreply.github.com> Date: Sat, 21 Sep 2024 21:48:33 +0100 Subject: [PATCH] Fix compilation on nightly (#2001) Fix nightly compile --- .../messages/portfolio/document/utility_types/nodes.rs | 10 +++++----- frontend/wasm/.cargo/config.toml | 3 --- frontend/wasm/src/lib.rs | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/editor/src/messages/portfolio/document/utility_types/nodes.rs b/editor/src/messages/portfolio/document/utility_types/nodes.rs index de101fb56..ebd839a78 100644 --- a/editor/src/messages/portfolio/document/utility_types/nodes.rs +++ b/editor/src/messages/portfolio/document/utility_types/nodes.rs @@ -71,7 +71,7 @@ impl SelectedNodes { }) } - pub fn selected_visible_layers<'a>(&'a self, network_interface: &'a NodeNetworkInterface) -> impl Iterator + '_ { + pub fn selected_visible_layers<'a>(&'a self, network_interface: &'a NodeNetworkInterface) -> impl Iterator + 'a { self.selected_layers(network_interface.document_metadata()) .filter(move |&layer| self.layer_visible(layer, network_interface)) } @@ -86,21 +86,21 @@ impl SelectedNodes { }) } - pub fn selected_unlocked_layers<'a>(&'a self, network_interface: &'a NodeNetworkInterface) -> impl Iterator + '_ { + pub fn selected_unlocked_layers<'a>(&'a self, network_interface: &'a NodeNetworkInterface) -> impl Iterator + 'a { self.selected_layers(network_interface.document_metadata()) .filter(move |&layer| !self.layer_locked(layer, network_interface)) } - pub fn selected_visible_and_unlocked_layers<'a>(&'a self, network_interface: &'a NodeNetworkInterface) -> impl Iterator + '_ { + pub fn selected_visible_and_unlocked_layers<'a>(&'a self, network_interface: &'a NodeNetworkInterface) -> impl Iterator + 'a { self.selected_layers(network_interface.document_metadata()) .filter(move |&layer| self.layer_visible(layer, network_interface) && !self.layer_locked(layer, network_interface)) } - pub fn selected_layers<'a>(&'a self, metadata: &'a DocumentMetadata) -> impl Iterator + '_ { + pub fn selected_layers<'a>(&'a self, metadata: &'a DocumentMetadata) -> impl Iterator + 'a { metadata.all_layers().filter(|layer| self.0.contains(&layer.to_node())) } - pub fn selected_layers_except_artboards<'a>(&'a self, network_interface: &'a NodeNetworkInterface) -> impl Iterator + '_ { + pub fn selected_layers_except_artboards<'a>(&'a self, network_interface: &'a NodeNetworkInterface) -> impl Iterator + 'a { self.selected_layers(network_interface.document_metadata()) .filter(move |&layer| !network_interface.is_artboard(&layer.to_node(), &[])) } diff --git a/frontend/wasm/.cargo/config.toml b/frontend/wasm/.cargo/config.toml index 8baae1df4..4087f77f9 100644 --- a/frontend/wasm/.cargo/config.toml +++ b/frontend/wasm/.cargo/config.toml @@ -10,6 +10,3 @@ rustflags = [ "link-arg=--max-memory=4294967296", "--cfg=web_sys_unstable_apis", ] - -[unstable] -build-std = ["std"] diff --git a/frontend/wasm/src/lib.rs b/frontend/wasm/src/lib.rs index 451d65b22..6cc7edd29 100644 --- a/frontend/wasm/src/lib.rs +++ b/frontend/wasm/src/lib.rs @@ -36,7 +36,7 @@ pub fn init_graphite() { } /// When a panic occurs, notify the user and log the error to the JS console before the backend dies -pub fn panic_hook(info: &panic::PanicInfo) { +pub fn panic_hook(info: &panic::PanicHookInfo) { let info = info.to_string(); let backtrace = Error::new("stack").stack().to_string(); if backtrace.contains("DynAnyNode") {