diff --git a/src/lib.rs b/src/lib.rs index de69b356b..04d342a9f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -793,18 +793,13 @@ where ); } else { // if compiler version is the same, type misnaming is an error - if t_typ != type_name::() { + if t_typ != type_name::() || s_typ != type_name::() { return Err(format_err!( - "expected shardio type {}, got {}", + "Expected type {} with sort order {}, but got type {} with sort order {}", type_name::(), - t_typ - )); - } - if s_typ != type_name::() { - return Err(format_err!( - "expected shardio sort {}, got {}", type_name::(), - s_typ + t_typ, + s_typ, )); } }