File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 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
11651165pub unsafe extern "C" fn cass_value_is_collection ( value : * const CassValue ) -> cass_bool_t {
11661166 let val = ptr_to_ref ( value) ;
11671167
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
11741174}
11751175
11761176#[ no_mangle]
@@ -1545,9 +1545,6 @@ extern "C" {
15451545extern "C" {
15461546 pub fn cass_value_type(value: *const CassValue) -> CassValueType;
15471547}
1548- extern "C" {
1549- pub fn cass_value_is_collection(value: *const CassValue) -> cass_bool_t;
1550- }
15511548extern "C" {
15521549 pub fn cass_value_item_count(collection: *const CassValue) -> size_t;
15531550}
You can’t perform that action at this time.
0 commit comments