Add tests for op nodes

This commit is contained in:
Dennis
2022-08-13 18:21:46 +02:00
committed by Keavon Chambers
parent b06e00ce61
commit 8a0eb0e266
2 changed files with 59 additions and 8 deletions

View File

@@ -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)