Skip to content

Commit

Permalink
added #[allow(unused)] for the false-positive unused errors in inte…
Browse files Browse the repository at this point in the history
…gration-tests
  • Loading branch information
CommanderStorm committed Aug 18, 2024
1 parent dab9eba commit f6e623e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libosdp/tests/common/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Result<T> = core::result::Result<T, libosdp::OsdpError>;

pub struct CpDevice {
dev: Arc<Mutex<ControlPanel>>,
#[allow(unused)] // false positive, it is used!
pub receiver: Receiver<(i32, OsdpEvent)>,
}

Expand Down
2 changes: 2 additions & 0 deletions libosdp/tests/common/threadbus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub struct ThreadBus {
recv: Mutex<BroadcastReceiver<Vec<u8>>>,
}

#[allow(unused)] // false positive, it is used!
fn str_to_channel_id(key: &str) -> i32 {
let mut hasher = DefaultHasher::new();
key.hash(&mut hasher);
Expand All @@ -29,6 +30,7 @@ fn str_to_channel_id(key: &str) -> i32 {
}

impl ThreadBus {
#[allow(unused)] // false positive, it is used!
pub fn new(name: &str) -> Self {
let (send, recv) = multiqueue::broadcast_queue(4);
Self {
Expand Down

0 comments on commit f6e623e

Please sign in to comment.