Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scylla-rust-wrapper/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ fn prepare_cppdriver_data(outfile: &str, allowed_types: &[&str], out_path: &Path
for t in allowed_types {
type_bindings = type_bindings.allowlist_type(t);
}

// Prevent these clippy complaints:
// `warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique`
type_bindings = type_bindings.no_partialeq(".*Callback.*");

let type_bindings = type_bindings
.generate()
.expect("Unable to generate bindings");
Expand Down
8 changes: 4 additions & 4 deletions scylla-rust-wrapper/src/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ impl CassCollection {
match data_type {
CassDataTypeInner::List { typ: subtype, .. }
| CassDataTypeInner::Set { typ: subtype, .. } => {
if let Some(subtype) = subtype {
if !value::is_type_compatible(value, subtype) {
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
}
if let Some(subtype) = subtype
&& !value::is_type_compatible(value, subtype)
{
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
}
}

Expand Down
8 changes: 4 additions & 4 deletions scylla-rust-wrapper/src/tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ impl CassTuple {
return CassError::CASS_ERROR_LIB_INDEX_OUT_OF_BOUNDS;
}

if let Some(inner_types) = self.get_types() {
if !value::is_type_compatible(&v, &inner_types[index]) {
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
}
if let Some(inner_types) = self.get_types()
&& !value::is_type_compatible(&v, &inner_types[index])
{
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
}

self.items[index] = v;
Expand Down