Commit 368a4ae1 by Paddy Horan Committed by Nick Hynes

[Rust] Fix issue with CPP enums. (#4019)

parent c93b69ff
......@@ -97,7 +97,7 @@ pub struct TVMContext {
impl<'a> From<&'a TVMContext> for DLContext {
fn from(ctx: &'a TVMContext) -> Self {
Self {
device_type: ctx.device_type as i32,
device_type: ctx.device_type as _,
device_id: ctx.device_id as i32,
}
}
......
......@@ -83,7 +83,7 @@ macro_rules! TVMPODValue {
use $name::*;
#[allow(non_upper_case_globals)]
unsafe {
match type_code as i32 {
match type_code as _ {
DLDataTypeCode_kDLInt => Int($value.v_int64),
DLDataTypeCode_kDLUInt => UInt($value.v_int64),
DLDataTypeCode_kDLFloat => Float($value.v_float64),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment