Skip to content

Commit 20bda59

Browse files
committed
Add isize/usize and i128/u128 implementations for Convert trait
1 parent 27aa8a4 commit 20bda59

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

node-graph/gcore/src/ops.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,10 @@ macro_rules! impl_convert {
631631
impl_convert!(u32, $to);
632632
impl_convert!(i64, $to);
633633
impl_convert!(u64, $to);
634+
impl_convert!(isize, $to);
635+
impl_convert!(usize, $to);
636+
impl_convert!(i128, $to);
637+
impl_convert!(u128, $to);
634638
impl_convert!(f32, $to);
635639
impl_convert!(f64, $to);
636640
};
@@ -643,6 +647,10 @@ impl_convert!(i32);
643647
impl_convert!(u32);
644648
impl_convert!(i64);
645649
impl_convert!(u64);
650+
impl_convert!(isize);
651+
impl_convert!(usize);
652+
impl_convert!(i128);
653+
impl_convert!(u128);
646654
impl_convert!(f32);
647655
impl_convert!(f64);
648656

node-graph/interpreted-executor/src/node_registry.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
144144
convert_node!(from: u32, to: numbers),
145145
convert_node!(from: i64, to: numbers),
146146
convert_node!(from: u64, to: numbers),
147+
convert_node!(from: isize, to: numbers),
148+
convert_node!(from: usize, to: numbers),
149+
convert_node!(from: i128, to: numbers),
150+
convert_node!(from: u128, to: numbers),
147151
convert_node!(from: f32, to: numbers),
148152
convert_node!(from: f64, to: numbers),
149153
]
@@ -243,6 +247,10 @@ mod node_registry_macros {
243247
convert_node!(from: $from, to: u32),
244248
convert_node!(from: $from, to: i64),
245249
convert_node!(from: $from, to: u64),
250+
convert_node!(from: $from, to: isize),
251+
convert_node!(from: $from, to: usize),
252+
convert_node!(from: $from, to: i128),
253+
convert_node!(from: $from, to: u128),
246254
convert_node!(from: $from, to: f32),
247255
convert_node!(from: $from, to: f64),
248256
];

0 commit comments

Comments
 (0)