Skip to content

Commit 86dd8cf

Browse files
Fix linter warnings
1 parent 43b0603 commit 86dd8cf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sys/signal.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,15 +392,19 @@ pub enum SignalValue {
392392
#[cfg(any(feature = "aio", feature = "signal"))]
393393
impl SignalValue {
394394
#[cfg(target_os = "linux")]
395+
#[allow(dead_code)]
395396
unsafe fn convert_to_int_unchecked(self) -> libc::c_int {
397+
// Note: dead code is allowed, since this is a private method that can remain unused on some platforms
396398
match self {
397399
SignalValue::Standard(s) => s as libc::c_int,
398400
SignalValue::Realtime(n) => libc::SIGRTMIN() + n,
399401
}
400402
}
401403

402404
#[cfg(not(target_os = "linux"))]
405+
#[allow(dead_code)]
403406
unsafe fn convert_to_int_unchecked(self) -> libc::c_int {
407+
// Note: dead code is allowed, since this is a private method that can remain unused on some platforms
404408
match self {
405409
SignalValue::Standard(s) => s as libc::c_int,
406410
}
@@ -999,6 +1003,12 @@ impl Hash for SigSet {
9991003
///
10001004
/// Call [`SigSet::iter`] to create an iterator.
10011005
#[derive(Clone, Debug)]
1006+
#[cfg(not(any(
1007+
target_os = "haiku",
1008+
target_os = "openbsd",
1009+
target_os = "dragonfly",
1010+
target_os = "redox"
1011+
)))]
10021012
pub struct SigSetIter<'a> {
10031013
sigset: &'a SigSet,
10041014
inner: SignalIterator,

0 commit comments

Comments
 (0)