Skip to content

Commit b7c5a68

Browse files
authored
Merge pull request #359 from wprzytula/appease-clippy
codewide: appease clippy 1.89
2 parents fa3f7d7 + 77d360f commit b7c5a68

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +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) {
90-
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
91-
}
88+
if let Some(subtype) = subtype
89+
&& !value::is_type_compatible(value, subtype)
90+
{
91+
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
9292
}
9393
}
9494

scylla-rust-wrapper/src/tuple.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +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]) {
48-
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
49-
}
46+
if let Some(inner_types) = self.get_types()
47+
&& !value::is_type_compatible(&v, &inner_types[index])
48+
{
49+
return CassError::CASS_ERROR_LIB_INVALID_VALUE_TYPE;
5050
}
5151

5252
self.items[index] = v;

0 commit comments

Comments
 (0)