mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-18 18:38:05 +08:00
Add tests for op nodes
This commit is contained in:
@@ -2,6 +2,8 @@ use core::marker::PhantomData;
|
||||
use core::mem::MaybeUninit;
|
||||
use core::sync::atomic::AtomicBool;
|
||||
|
||||
use crate::ops::CloneNode;
|
||||
use crate::structural::ComposeNode;
|
||||
use crate::Node;
|
||||
|
||||
pub struct IntNode<const N: u32>;
|
||||
@@ -27,6 +29,12 @@ impl<T> ValueNode<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'n, T: Clone + 'n> ValueNode<T> {
|
||||
pub const fn clone(self) -> ComposeNode<'n, (), ValueNode<T>, CloneNode> {
|
||||
ComposeNode::new(self, CloneNode)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<T> for ValueNode<T> {
|
||||
fn from(value: T) -> Self {
|
||||
ValueNode::new(value)
|
||||
|
||||
Reference in New Issue
Block a user