diff --git a/node-graph/graph-craft/src/document/value.rs b/node-graph/graph-craft/src/document/value.rs
index 70d67e8caa..57f5bcaae2 100644
--- a/node-graph/graph-craft/src/document/value.rs
+++ b/node-graph/graph-craft/src/document/value.rs
@@ -4,13 +4,13 @@ use crate::application_io::resource::Resource;
use crate::proto::Any as DAny;
use brush_nodes::brush_stroke::BrushStroke;
use core_types::color::SRGBA8;
-use core_types::list::List;
-use core_types::transform::Footprint;
-use core_types::uuid::NodeId;
use core_types::context::Context;
use core_types::gnode::GNode;
use core_types::gpoll::GPoll;
+use core_types::list::List;
use core_types::registry::{EdgeHandle, edge_type};
+use core_types::transform::Footprint;
+use core_types::uuid::NodeId;
use core_types::value::value_edge;
use core_types::{CacheHash, Color, ContextModification, MemoHash, Node, Type, TypeDescriptor};
use dyn_any::DynAny;
diff --git a/node-graph/interpreted-executor/src/dynamic_executor.rs b/node-graph/interpreted-executor/src/dynamic_executor.rs
index 4596c8af64..cc8674214b 100644
--- a/node-graph/interpreted-executor/src/dynamic_executor.rs
+++ b/node-graph/interpreted-executor/src/dynamic_executor.rs
@@ -459,10 +459,10 @@ impl BorrowTree {
#[cfg(test)]
mod test {
use super::*;
- use graph_craft::document::value::TaggedValue;
use core_types::arena::ArenaCell;
use core_types::context::{ExtractFootprint, ExtractVarArgs};
use core_types::runtime::{SourceFuture, Spawner};
+ use graph_craft::document::value::TaggedValue;
struct InertSpawner;
diff --git a/node-graph/interpreted-executor/src/node_registry.rs b/node-graph/interpreted-executor/src/node_registry.rs
index 9356290fa5..2026e568e8 100644
--- a/node-graph/interpreted-executor/src/node_registry.rs
+++ b/node-graph/interpreted-executor/src/node_registry.rs
@@ -13,12 +13,12 @@ use graphene_std::raster::GPU;
use graphene_std::raster::color::Color;
use graphene_std::raster::*;
use graphene_std::raster::{CPU, Raster};
+use graphene_std::registry::{ConstructionError, EdgeHandle, ErasedGNode, NodeIOTypes, RegistryEntry};
use graphene_std::render_node::RenderIntermediate;
+use graphene_std::runtime::RuntimeHandle;
use graphene_std::transform::Footprint;
use graphene_std::uuid::NodeId;
use graphene_std::vector::Vector;
-use graphene_std::registry::{ConstructionError, EdgeHandle, ErasedGNode, NodeIOTypes, RegistryEntry};
-use graphene_std::runtime::RuntimeHandle;
use graphene_std::{Artboard, Context, Graphic, ProtoNodeIdentifier, SourceId, concrete, fn_type};
use node_registry_macros::{async_node, convert_node, into_node};
use std::collections::HashMap;
diff --git a/node-graph/interpreted-executor/tests/graphene_spike.rs b/node-graph/interpreted-executor/tests/graphene_spike.rs
index ad5524acb0..dd55022b76 100644
--- a/node-graph/interpreted-executor/tests/graphene_spike.rs
+++ b/node-graph/interpreted-executor/tests/graphene_spike.rs
@@ -86,10 +86,7 @@ struct LendStringNode {
impl LendStringNode {
fn new(value: String) -> Self {
- Self {
- value,
- cell: ArenaCell::new(),
- }
+ Self { value, cell: ArenaCell::new() }
}
}
diff --git a/node-graph/libraries/core-types/src/gnode.rs b/node-graph/libraries/core-types/src/gnode.rs
index da9b73fff5..576da663ae 100644
--- a/node-graph/libraries/core-types/src/gnode.rs
+++ b/node-graph/libraries/core-types/src/gnode.rs
@@ -168,10 +168,7 @@ impl StatusCell {
}
pub fn no_partial() -> Self {
- Self {
- no_partial: true,
- ..Self::new()
- }
+ Self { no_partial: true, ..Self::new() }
}
pub fn eval_input>(&self, input_index: usize, node: &N, input: &Input) -> Result {
diff --git a/node-graph/libraries/core-types/src/registry.rs b/node-graph/libraries/core-types/src/registry.rs
index 58ec8f2555..bd3f32f574 100644
--- a/node-graph/libraries/core-types/src/registry.rs
+++ b/node-graph/libraries/core-types/src/registry.rs
@@ -117,10 +117,7 @@ impl SharedEdge {
}
pub fn share(&self) -> Self {
- Self {
- ptr: self.ptr,
- own: self.own.clone(),
- }
+ Self { ptr: self.ptr, own: self.own.clone() }
}
}
@@ -152,12 +149,7 @@ where
unsafe { self.ptr.as_ref() }.serialize()
}
- fn eval_batch<'a>(
- &self,
- input: &'a Input,
- range: std::ops::Range,
- scratch: Option<&'a mut [std::mem::MaybeUninit]>,
- ) -> crate::gnode::BatchStatus<'a, Self::Output>
+ fn eval_batch<'a>(&self, input: &'a Input, range: std::ops::Range, scratch: Option<&'a mut [std::mem::MaybeUninit]>) -> crate::gnode::BatchStatus<'a, Self::Output>
where
Input: crate::context::InjectIndex + Copy,
{
@@ -235,10 +227,7 @@ impl EdgeHandle {
pub fn downcast_erased(self, expected: Type) -> Result, ConstructionError> {
let found = self.ty;
- self.node
- .downcast::>()
- .map(|edge| *edge)
- .map_err(|_| ConstructionError::Type { expected, found })
+ self.node.downcast::>().map(|edge| *edge).map_err(|_| ConstructionError::Type { expected, found })
}
}
@@ -364,7 +353,7 @@ mod tests {
#[test]
fn derive_ctx_repeat_pushes_index_levels_through_the_erased_edge() {
- use crate::context::{Derived, DeriveCtx, ExtractIndex};
+ use crate::context::{DeriveCtx, Derived, ExtractIndex};
struct RepeatNode {
content: Node0,
@@ -421,7 +410,7 @@ mod tests {
#[test]
fn derive_ctx_footprint_replace_reaches_the_content() {
- use crate::context::{Derived, DeriveCtx, ExtractFootprint};
+ use crate::context::{DeriveCtx, Derived, ExtractFootprint};
use crate::transform::Footprint;
struct ShiftFootprintNode {
diff --git a/node-graph/libraries/core-types/src/runtime.rs b/node-graph/libraries/core-types/src/runtime.rs
index 891b02499a..ed7e5df55e 100644
--- a/node-graph/libraries/core-types/src/runtime.rs
+++ b/node-graph/libraries/core-types/src/runtime.rs
@@ -300,12 +300,7 @@ mod tests {
let gate = Arc::new(std::sync::atomic::AtomicBool::new(false));
let runtime = Arc::new(MockRuntime::default());
- let graph = StagedSumNode::new(
- SourceNode(40.0f64),
- GatedSource(gate.clone(), 2.0),
- SourceNode(RuntimeHandle(runtime.clone())),
- SourceNode(9u64),
- );
+ let graph = StagedSumNode::new(SourceNode(40.0f64), GatedSource(gate.clone(), 2.0), SourceNode(RuntimeHandle(runtime.clone())), SourceNode(9u64));
assert_eq!(GNode::eval(&graph, &ctx), GPoll::Pending);
assert_eq!(runtime.drain(), Vec::::new(), "an interrupted prologue must not spawn or claim the slot");
diff --git a/node-graph/libraries/wgpu-executor/src/lib.rs b/node-graph/libraries/wgpu-executor/src/lib.rs
index 23c6e602a2..12d0095f32 100644
--- a/node-graph/libraries/wgpu-executor/src/lib.rs
+++ b/node-graph/libraries/wgpu-executor/src/lib.rs
@@ -9,11 +9,11 @@ use crate::texture_cache::TextureCache;
use anyhow::Result;
use core_types::Color;
use core_types::color::SRGBA8;
-use std::sync::Mutex;
use glam::UVec2;
use graphene_application_io::{ApplicationIo, EditorApi};
use raster_types::Texture;
use std::sync::Arc;
+use std::sync::Mutex;
use vello::{AaConfig, AaSupport, RenderParams, Renderer, RendererOptions, Scene};
use wgpu::{Origin3d, TextureAspect};
diff --git a/node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs b/node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs
index e6eb444d13..325b5c0d69 100644
--- a/node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs
+++ b/node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs
@@ -2,10 +2,10 @@ use crate::WgpuContext;
use crate::shader_runtime::{FULLSCREEN_VERTEX_SHADER_NAME, ShaderRuntime};
use core_types::list::{Item, List};
use core_types::shaders::buffer_struct::BufferStruct;
-use std::sync::Mutex;
use raster_types::{GPU, Raster};
use std::borrow::Cow;
use std::collections::HashMap;
+use std::sync::Mutex;
use wgpu::util::{BufferInitDescriptor, DeviceExt};
use wgpu::{
BindGroupDescriptor, BindGroupEntry, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingResource, BindingType, Buffer, BufferBinding, BufferBindingType, BufferUsages, ColorTargetState, Face,
diff --git a/node-graph/libraries/wgpu-executor/src/texture_conversion.rs b/node-graph/libraries/wgpu-executor/src/texture_conversion.rs
index cdfa4c26fa..65853dc2d6 100644
--- a/node-graph/libraries/wgpu-executor/src/texture_conversion.rs
+++ b/node-graph/libraries/wgpu-executor/src/texture_conversion.rs
@@ -1,4 +1,5 @@
use crate::WgpuExecutor;
+use crate::WgpuExecutorHandle;
use core_types::Color;
use core_types::Ctx;
use core_types::color::SRGBA8;
@@ -8,7 +9,6 @@ use core_types::runtime::SourceFuture;
use core_types::transform::Footprint;
use raster_types::Image;
use raster_types::{CPU, GPU, Raster};
-use crate::WgpuExecutorHandle;
use wgpu::util::{DeviceExt, TextureDataOrder};
use wgpu::{Extent3d, TextureDescriptor, TextureDimension, TextureFormat, TextureUsages};
@@ -40,7 +40,6 @@ fn upload_to_texture(device: &wgpu::Device, queue: &wgpu::Queue, image: &Raster<
)
}
-
/// Passthrough conversion for GPU `List`s - no conversion needed
impl Convert>, WgpuExecutorHandle> for List> {
fn convert(self, _: Footprint, _converter: WgpuExecutorHandle) -> List> {
diff --git a/node-graph/node-macro/src/gcodegen.rs b/node-graph/node-macro/src/gcodegen.rs
index 1ddb4bb067..a988cb06e9 100644
--- a/node-graph/node-macro/src/gcodegen.rs
+++ b/node-graph/node-macro/src/gcodegen.rs
@@ -165,7 +165,10 @@ pub(crate) fn generate_gnode_code(crate_ident: &CrateIdent, parsed: &ParsedNodeF
}
let clampable_bounds = regular_fields.iter().filter_map(|field| {
- let ParsedFieldType::Regular(RegularParsedField { ty, number_hard_min, number_hard_max, .. }) = &field.ty else {
+ let ParsedFieldType::Regular(RegularParsedField {
+ ty, number_hard_min, number_hard_max, ..
+ }) = &field.ty
+ else {
return None;
};
(number_hard_min.is_some() || number_hard_max.is_some()).then(|| quote!(#ty: #core_types::misc::Clampable))
@@ -617,9 +620,7 @@ fn entries_tokens(parsed: &ParsedNodeFn, struct_name: &Ident, data_field_generic
let types = row.iter();
let edge_types = row.iter().map(|ty| quote!(gcore::registry::SharedEdge>));
let output = quote!(<#struct_name<#(#edge_types),*> as gcore::gnode::GNode>>::Output);
- let downcasts = names.iter().zip(row.iter()).map(|(name, ty)| {
- quote!(let #name = inputs.next().unwrap().downcast::<#ty>()?;)
- });
+ let downcasts = names.iter().zip(row.iter()).map(|(name, ty)| quote!(let #name = inputs.next().unwrap().downcast::<#ty>()?;));
quote! {
gcore::registry::RegistryEntry {
io: gcore::registry::NodeIOTypes::new(
@@ -666,15 +667,14 @@ fn implementation_rows(parsed: &ParsedNodeFn, regular_fields: &[&ParsedField]) -
},
ParsedFieldType::Node(NodeParsedField { output_type, implementations, .. }) => match implementations.is_empty() {
false => Some(implementations.iter().map(|implementation| implementation.output.clone()).collect()),
- true => open_generics.iter().all(|generic| !crate::codegen::type_contains_ident(output_type, generic)).then(|| vec![output_type.clone()]),
+ true => open_generics
+ .iter()
+ .all(|generic| !crate::codegen::type_contains_ident(output_type, generic))
+ .then(|| vec![output_type.clone()]),
},
})
.collect::