Skip to content

Commit

Permalink
enable deny(clippy::expect_used) for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed Sep 26, 2024
1 parent f4bcb27 commit c6523b6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scylla-cql/src/frame/response/cql_to_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,11 @@ mod tests {
);
}

// Enabling `expect_used` clippy lint,
// validates that `derive(FromRow)` macro definition does do not violates such rule under the hood.
// Could be removed after such rule will be applied for the whole crate.
// <https://rust-lang.github.io/rust-clippy/master/index.html#/expect_used>
#[deny(clippy::expect_used)]
#[test]
fn struct_from_row() {
#[derive(FromRow)]
Expand All @@ -965,6 +970,11 @@ mod tests {
assert_eq!(my_row.c, Some(vec![1, 2]));
}

// Enabling `expect_used` clippy lint,
// validates that `derive(FromRow)` macro definition does do not violates such rule under the hood.
// Could be removed after such rule will be applied for the whole crate.
// <https://rust-lang.github.io/rust-clippy/master/index.html#/expect_used>
#[deny(clippy::expect_used)]
#[test]
fn struct_from_row_wrong_size() {
#[derive(FromRow, PartialEq, Eq, Debug)]
Expand Down Expand Up @@ -1004,6 +1014,11 @@ mod tests {
);
}

// Enabling `expect_used` clippy lint,
// validates that `derive(FromRow)` macro definition does do not violates such rule under the hood.
// Could be removed after such rule will be applied for the whole crate.
// <https://rust-lang.github.io/rust-clippy/master/index.html#/expect_used>
#[deny(clippy::expect_used)]
#[test]
fn unnamed_struct_from_row() {
#[derive(FromRow)]
Expand Down

0 comments on commit c6523b6

Please sign in to comment.