Skip to content

Commit

Permalink
workaround: temporarily allow unused_imports warnings with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fursich committed Apr 11, 2024
1 parent 597673d commit 899b3b7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/database_seeder.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
mod test_utils;
use test_utils::*;
use test_utils::{
get_test_base_dir, parse_datetime, sort_records_by_ids, Customer, Item, MockTable, Order, Plan,
};
extern crate cder;

use anyhow::Result;
Expand Down
4 changes: 3 additions & 1 deletion tests/database_seeder_async.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
mod test_utils;
use test_utils::*;
use test_utils::{
get_test_base_dir, parse_datetime, sort_records_by_ids, Customer, Item, MockTable, Order, Plan,
};
extern crate cder;

use anyhow::Result;
Expand Down
2 changes: 1 addition & 1 deletion tests/struct_loader.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod test_utils;
use test_utils::*;
use test_utils::{get_test_base_dir, parse_datetime, Customer, Item, Order, Plan};
extern crate cder;

use anyhow::Result;
Expand Down
5 changes: 5 additions & 0 deletions tests/test_utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
mod mock_database;
mod types;

// FIXME: workaround for false positive detection of unused_imports, which might be related to:
// https://github.com/rust-lang/rust/issues/121708
#[allow(unused_imports)]
pub use mock_database::{sort_records_by_ids, MockTable};

pub use types::{Customer, Item, Order, Plan};

use anyhow::Result;
Expand Down

0 comments on commit 899b3b7

Please sign in to comment.