Skip to content

Commit c685da8

Browse files
committed
codewide: appease clippy 1.89
1 parent fa3f7d7 commit c685da8

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

scylla-rust-wrapper/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ fn prepare_cppdriver_data(outfile: &str, allowed_types: &[&str], out_path: &Path
7171
for t in allowed_types {
7272
type_bindings = type_bindings.allowlist_type(t);
7373
}
74+
75+
// Prevent these clippy complaints:
76+
// `warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique`
77+
type_bindings = type_bindings.no_partialeq(".*Callback.*");
78+
7479
let type_bindings = type_bindings
7580
.generate()
7681
.expect("Unable to generate bindings");

scylla-rust-wrapper/src/collection.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,10 @@ impl CassCollection {
8585
match data_type {
8686
CassDataTypeInner::List { typ: subtype, .. }
8787
| CassDataTypeInner::Set { typ: subtype, .. } => {
88-
if let Some(subtype) = subtype {
89-
if !value::is_type_compatible(value, subtype) {
88+
if let Some(subtype) = subtype
89+
&& !value::is_type_compatible(value, subtype) {
9090
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
9191
}
92-
}
9392
}
9493

9594
CassDataTypeInner::Map { typ, .. } => {

scylla-rust-wrapper/src/tuple.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ impl CassTuple {
4343
return CassError::CASS_ERROR_LIB_INDEX_OUT_OF_BOUNDS;
4444
}
4545

46-
if let Some(inner_types) = self.get_types() {
47-
if !value::is_type_compatible(&v, &inner_types[index]) {
46+
if let Some(inner_types) = self.get_types()
47+
&& !value::is_type_compatible(&v, &inner_types[index]) {
4848
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
4949
}
50-
}
5150

5251
self.items[index] = v;
5352

0 commit comments

Comments
 (0)