Skip to content

Commit

Permalink
Merge pull request #996 from wprzytula/silence-mock-structs-never-con…
Browse files Browse the repository at this point in the history
…structed

treewide: silence mock structs unused warning
  • Loading branch information
wprzytula authored May 14, 2024
2 parents ac2d4dc + 3455abf commit c25c54d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions scylla-cql/src/types/serialize/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,7 @@ mod tests {
// Do not remove. It's not used in tests but we keep it here to check that
// we properly ignore warnings about unused variables, unnecessary `mut`s
// etc. that usually pop up when generating code for empty structs.
#[allow(unused)]
#[derive(SerializeRow)]
#[scylla(crate = crate)]
struct TestRowWithNoColumns {}
Expand Down
2 changes: 2 additions & 0 deletions scylla-cql/src/types/serialize/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,7 @@ mod tests {
// Do not remove. It's not used in tests but we keep it here to check that
// we properly ignore warnings about unused variables, unnecessary `mut`s
// etc. that usually pop up when generating code for empty structs.
#[allow(unused)]
#[derive(SerializeCql)]
#[scylla(crate = crate)]
struct TestUdtWithNoFields {}
Expand Down Expand Up @@ -2596,6 +2597,7 @@ mod tests {
assert_eq!(reference, udt);
}

#[allow(unused)]
#[derive(SerializeCql, Debug)]
#[scylla(crate = crate, flavor = "enforce_order", skip_name_checks)]
struct TestUdtWithSkippedNameChecks {
Expand Down
1 change: 1 addition & 0 deletions scylla/tests/integration/hygiene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ macro_rules! test_crate {
assert_eq!(sv, sv2);
}

#[allow(unused)]
#[derive(_scylla::macros::SerializeCql, _scylla::macros::SerializeRow)]
#[scylla(crate = _scylla)]
struct TestStructNew {
Expand Down

0 comments on commit c25c54d

Please sign in to comment.