Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
mox692 committed Nov 12, 2024
1 parent 674aae0 commit 5ba5374
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions tokio/src/signal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ mod os {
}

pub mod unix;

#[cfg(any(windows, docsrs))]
#[cfg_attr(docsrs, doc(cfg(windows)))]
pub mod windows;

mod reusable_box;
Expand Down
7 changes: 0 additions & 7 deletions tokio/src/signal/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,11 @@ use crate::signal::RxFuture;
use std::io;
use std::task::{Context, Poll};

#[cfg(windows)]
#[path = "windows/sys.rs"]
mod imp;

#[cfg(windows)]
pub(crate) use self::imp::{OsExtraData, OsStorage};

// For building documentation on Unix machines when the `docsrs` flag is set.
#[cfg(not(windows))]
#[path = "windows/stub.rs"]
mod imp;

/// Creates a new listener which receives "ctrl-c" notifications sent to the
/// process.
///
Expand Down
3 changes: 3 additions & 0 deletions tokio/src/signal/windows/stub.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![cfg(any(windows, docsrs))]
#![cfg_attr(docsrs, doc(cfg(all(windows, feature = "signal"))))]

//! Stub implementations for the platform API so that rustdoc can build linkable
//! documentation on non-windows platforms.
Expand Down
3 changes: 3 additions & 0 deletions tokio/src/signal/windows/sys.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![cfg(any(windows, docsrs))]
#![cfg_attr(docsrs, doc(cfg(all(windows, feature = "signal"))))]

use std::io;
use std::sync::Once;

Expand Down

0 comments on commit 5ba5374

Please sign in to comment.