File tree 1 file changed +6
-9
lines changed 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1165,12 +1165,12 @@ pub unsafe extern "C" fn cass_value_is_null(value: *const CassValue) -> cass_boo
1165
1165
pub unsafe extern "C" fn cass_value_is_collection ( value : * const CassValue ) -> cass_bool_t {
1166
1166
let val = ptr_to_ref ( value) ;
1167
1167
1168
- match val . value {
1169
- Some ( Value :: CollectionValue ( Collection :: List ( _ ) ) ) => true as cass_bool_t ,
1170
- Some ( Value :: CollectionValue ( Collection :: Set ( _ ) ) ) => true as cass_bool_t ,
1171
- Some ( Value :: CollectionValue ( Collection :: Map ( _ ) ) ) => true as cass_bool_t ,
1172
- _ => false as cass_bool_t ,
1173
- }
1168
+ matches ! (
1169
+ val . value_type . get_value_type ( ) ,
1170
+ CassValueType :: CASS_VALUE_TYPE_LIST
1171
+ | CassValueType :: CASS_VALUE_TYPE_SET
1172
+ | CassValueType :: CASS_VALUE_TYPE_MAP
1173
+ ) as cass_bool_t
1174
1174
}
1175
1175
1176
1176
#[ no_mangle]
@@ -1545,9 +1545,6 @@ extern "C" {
1545
1545
extern "C" {
1546
1546
pub fn cass_value_type(value: *const CassValue) -> CassValueType;
1547
1547
}
1548
- extern "C" {
1549
- pub fn cass_value_is_collection(value: *const CassValue) -> cass_bool_t;
1550
- }
1551
1548
extern "C" {
1552
1549
pub fn cass_value_item_count(collection: *const CassValue) -> size_t;
1553
1550
}
You can’t perform that action at this time.
0 commit comments