From fc9e69a7a7ed2aadf8f1f9823a47ac3b77b17dde Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 6 Sep 2026 15:48:45 +0000 Subject: [PATCH] Spell the elided Graphic and Artboard lifetimes in return paths --- .../messages/tool/tool_messages/artboard_tool.rs | 2 +- node-graph/libraries/graphic-types/src/artboard.rs | 2 +- .../libraries/graphic-types/src/graphic/mod.rs | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/editor/src/messages/tool/tool_messages/artboard_tool.rs b/editor/src/messages/tool/tool_messages/artboard_tool.rs index 6eefe47e64..bc063ac28e 100644 --- a/editor/src/messages/tool/tool_messages/artboard_tool.rs +++ b/editor/src/messages/tool/tool_messages/artboard_tool.rs @@ -576,7 +576,7 @@ mod test_artboard { /// A leveled wire introspects as its whole legacy list, so each `extend` /// occurrence yields one list rather than one element. - async fn get_artboards(editor: &mut EditorTestUtils) -> List { + async fn get_artboards(editor: &mut EditorTestUtils) -> List> { let instrumented = match editor.eval_graph().await { Ok(instrumented) => instrumented, Err(e) => panic!("Failed to evaluate graph: {e}"), diff --git a/node-graph/libraries/graphic-types/src/artboard.rs b/node-graph/libraries/graphic-types/src/artboard.rs index afd2c9dd20..5992a18ad5 100644 --- a/node-graph/libraries/graphic-types/src/artboard.rs +++ b/node-graph/libraries/graphic-types/src/artboard.rs @@ -19,7 +19,7 @@ impl<'e> Artboard<'e> { Self(content) } - pub fn as_graphic_list(&self) -> &List { + pub fn as_graphic_list(&self) -> &List> { &self.0 } diff --git a/node-graph/libraries/graphic-types/src/graphic/mod.rs b/node-graph/libraries/graphic-types/src/graphic/mod.rs index 69b36a5706..9dc1b79a65 100644 --- a/node-graph/libraries/graphic-types/src/graphic/mod.rs +++ b/node-graph/libraries/graphic-types/src/graphic/mod.rs @@ -65,10 +65,10 @@ pub(in crate::graphic) fn detable_items<'e, T: Clone + Send + Sync + 'static>(li /// never constructs a legacy interior. pub trait IntoGraphicElement: Clone + Send + Sync + CacheHash + 'static { /// `None` reports arena exhaustion. - fn into_graphic_element(self, arena: &core_types::arena::Arena) -> Option; + fn into_graphic_element(self, arena: &core_types::arena::Arena) -> Option>; } -fn list_group(list: List, arena: &core_types::arena::Arena) -> Option +fn list_group(list: List, arena: &core_types::arena::Arena) -> Option> where T::Static: Clone + Send + Sync, { @@ -82,13 +82,13 @@ macro_rules! into_graphic_element { ($($leaf:ident: $element:ty;)*) => { $( impl IntoGraphicElement for $element { - fn into_graphic_element(self, _arena: &core_types::arena::Arena) -> Option { + fn into_graphic_element(self, _arena: &core_types::arena::Arena) -> Option> { Some(Graphic::$leaf(self)) } } impl IntoGraphicElement for List<$element> { - fn into_graphic_element(self, arena: &core_types::arena::Arena) -> Option { + fn into_graphic_element(self, arena: &core_types::arena::Arena) -> Option> { list_group(self, arena) } } @@ -106,13 +106,13 @@ into_graphic_element! { } impl IntoGraphicElement for Graphic<'static> { - fn into_graphic_element(self, _arena: &core_types::arena::Arena) -> Option { + fn into_graphic_element(self, _arena: &core_types::arena::Arena) -> Option> { Some(self) } } impl IntoGraphicElement for List> { - fn into_graphic_element(self, arena: &core_types::arena::Arena) -> Option { + fn into_graphic_element(self, arena: &core_types::arena::Arena) -> Option> { list_group(self, arena) } } @@ -340,7 +340,7 @@ impl From for Graphic<'_> { // Note: List conversions handled by blanket impl in gcore impl<'e> Graphic<'e> { - pub fn as_graphic(&self) -> Option<&List> { + pub fn as_graphic(&self) -> Option<&List>> { match self { Graphic::Graphic(graphic) => Some(graphic), _ => None,