Skip to content

Commit 46bc43a

Browse files
committed
Add isize/usize and i128/u128 implementations for Convert trait
1 parent a7699c7 commit 46bc43a

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

node-graph/gcore/src/ops.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,10 @@ macro_rules! impl_convert {
593593
impl_convert!(u32, $to);
594594
impl_convert!(i64, $to);
595595
impl_convert!(u64, $to);
596+
impl_convert!(isize, $to);
597+
impl_convert!(usize, $to);
598+
impl_convert!(i128, $to);
599+
impl_convert!(u128, $to);
596600
impl_convert!(f32, $to);
597601
impl_convert!(f64, $to);
598602
};
@@ -605,6 +609,10 @@ impl_convert!(i32);
605609
impl_convert!(u32);
606610
impl_convert!(i64);
607611
impl_convert!(u64);
612+
impl_convert!(isize);
613+
impl_convert!(usize);
614+
impl_convert!(i128);
615+
impl_convert!(u128);
608616
impl_convert!(f32);
609617
impl_convert!(f64);
610618

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)