From 507210b961ba620f8908da3ce3bf26518fda4a4b Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Wed, 11 Sep 2024 16:35:31 +0700 Subject: [PATCH] Fix some typos in the node graph code (#1970) --- node-graph/README.md | 2 +- node-graph/gcore/src/lib.rs | 2 +- node-graph/graph-craft/src/document.rs | 4 ++-- node-graph/graph-craft/src/proto.rs | 4 ++-- node-graph/gstd/src/raster.rs | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/node-graph/README.md b/node-graph/README.md index 629d4ba3..d04adb87 100644 --- a/node-graph/README.md +++ b/node-graph/README.md @@ -142,7 +142,7 @@ The definition for the constructor of a node that applies the opacity transforma Box::pin(async move { // Creates an instance of the struct that defines the node. let node = construct_node!(args, graphene_core::raster::OpacityNode<_>, [f64]).await; - // Create a new map image node, that calles the `node` for each pixel. + // Create a new map image node, that calls the `node` for each pixel. let map_node = graphene_std::raster::MapImageNode::new(graphene_core::value::ValueNode::new(node)); // Wraps this in a type erased future `Box + 'n>>` - this allows it to work with async. let map_node = graphene_std::any::FutureWrapperNode::new(map_node); diff --git a/node-graph/gcore/src/lib.rs b/node-graph/gcore/src/lib.rs index c11910e4..25678136 100644 --- a/node-graph/gcore/src/lib.rs +++ b/node-graph/gcore/src/lib.rs @@ -52,7 +52,7 @@ pub use types::Cow; /// See `node-graph/README.md` for information on how to define a new node. pub trait Node<'i, Input: 'i>: 'i { type Output: 'i; - /// Evalutes the node with the single specified input. + /// Evaluates the node with the single specified input. fn eval(&'i self, input: Input) -> Self::Output; /// Resets the node, e.g. the LetNode's cache is set to None. fn reset(&self) {} diff --git a/node-graph/graph-craft/src/document.rs b/node-graph/graph-craft/src/document.rs index 82b790d0..5ca9f5b7 100644 --- a/node-graph/graph-craft/src/document.rs +++ b/node-graph/graph-craft/src/document.rs @@ -32,8 +32,8 @@ impl core::fmt::Display for NodeId { } } -/// Hash two IDs together, returning a new ID that is always consistant for two input IDs in a specific order. -/// This is used during [`NodeNetwork::flatten`] in order to ensure consistant yet non-conflicting IDs for inner networks. +/// Hash two IDs together, returning a new ID that is always consistent for two input IDs in a specific order. +/// This is used during [`NodeNetwork::flatten`] in order to ensure consistent yet non-conflicting IDs for inner networks. fn merge_ids(a: NodeId, b: NodeId) -> NodeId { let mut hasher = DefaultHasher::new(); a.hash(&mut hasher); diff --git a/node-graph/graph-craft/src/proto.rs b/node-graph/graph-craft/src/proto.rs index 7f410d0b..bd8f7e98 100644 --- a/node-graph/graph-craft/src/proto.rs +++ b/node-graph/graph-craft/src/proto.rs @@ -61,8 +61,8 @@ impl Deref for NodeContainer { } /// #Safety -/// Marks NodeContainer as Sync. This dissallows the use of threadlocal stroage for nodes as this would invalidate references to them. -// TODO: implement this on a higher level wrapper to avoid missuse +/// Marks NodeContainer as Sync. This disallows the use of threadlocal storage for nodes as this would invalidate references to them. +// TODO: implement this on a higher level wrapper to avoid misuse #[cfg(feature = "dealloc_nodes")] unsafe impl Send for NodeContainer {} #[cfg(feature = "dealloc_nodes")] diff --git a/node-graph/gstd/src/raster.rs b/node-graph/gstd/src/raster.rs index d8ae1693..f390434a 100644 --- a/node-graph/gstd/src/raster.rs +++ b/node-graph/gstd/src/raster.rs @@ -218,7 +218,7 @@ fn mask_image< return image; } - // Transforms a point from the background image to the forground image + // Transforms a point from the background image to the foreground image let bg_to_fg = image.transform() * DAffine2::from_scale(1. / image_size); let stencil_transform_inverse = stencil.transform().inverse(); @@ -343,7 +343,7 @@ where MapFn: Fn(_P, _P) -> _P, { let background_size = DVec2::new(background.width() as f64, background.height() as f64); - // Transforms a point from the background image to the forground image + // Transforms a point from the background image to the foreground image let bg_to_fg = background.transform() * DAffine2::from_scale(1. / background_size); // Footprint of the foreground image (0,0) (1, 1) in the background image space