Skip to content

Commit f14cb31

Browse files
committed
convert include! goop to cfg pub use for debugging sanity
1 parent ce3ae60 commit f14cb31

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

src/platform/mod.rs

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,37 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
mod os {
11-
#[cfg(all(not(feature = "force-inprocess"), target_os = "linux"))]
12-
include!("linux/mod.rs");
10+
#[cfg(all(not(feature = "force-inprocess"), target_os = "linux"))]
11+
mod linux;
1312

14-
#[cfg(all(not(feature = "force-inprocess"), target_os = "macos"))]
15-
include!("macos/mod.rs");
13+
#[cfg(all(not(feature = "force-inprocess"), target_os = "macos"))]
14+
mod macos;
1615

17-
#[cfg(all(not(feature = "force-inprocess"), target_os = "windows"))]
18-
include!("windows/mod.rs");
16+
#[cfg(all(not(feature = "force-inprocess"), target_os = "windows"))]
17+
mod windows;
1918

20-
#[cfg(any(feature = "force-inprocess", target_os = "android"))]
21-
include!("inprocess/mod.rs");
22-
}
19+
#[cfg(any(feature = "force-inprocess", target_os = "android"))]
20+
mod inprocess;
2321

24-
pub use self::os::{OsIpcChannel, OsIpcOneShotServer, OsIpcReceiver, OsIpcReceiverSet};
25-
pub use self::os::{OsIpcSelectionResult, OsIpcSender, OsIpcSharedMemory};
26-
pub use self::os::{OsOpaqueIpcChannel, channel};
22+
#[cfg(all(not(feature = "force-inprocess"), target_os = "linux"))]
23+
pub use self::linux::{OsIpcChannel, OsIpcOneShotServer, OsIpcReceiver,
24+
OsIpcReceiverSet, OsIpcSelectionResult, OsIpcSender,
25+
OsIpcSharedMemory, OsOpaqueIpcChannel, channel};
26+
27+
#[cfg(all(not(feature = "force-inprocess"), target_os = "macos"))]
28+
pub use self::macos::{OsIpcChannel, OsIpcOneShotServer, OsIpcReceiver,
29+
OsIpcReceiverSet, OsIpcSelectionResult, OsIpcSender,
30+
OsIpcSharedMemory, OsOpaqueIpcChannel, channel};
31+
32+
#[cfg(all(not(feature = "force-inprocess"), target_os = "windows"))]
33+
pub use self::windows::{OsIpcChannel, OsIpcOneShotServer, OsIpcReceiver,
34+
OsIpcReceiverSet, OsIpcSelectionResult, OsIpcSender,
35+
OsIpcSharedMemory, OsOpaqueIpcChannel, channel};
36+
37+
#[cfg(any(feature = "force-inprocess", target_os = "android"))]
38+
pub use self::inprocess::{OsIpcChannel, OsIpcOneShotServer, OsIpcReceiver,
39+
OsIpcReceiverSet, OsIpcSelectionResult, OsIpcSender,
40+
OsIpcSharedMemory, OsOpaqueIpcChannel, channel};
2741

2842
#[cfg(test)]
2943
mod test;

0 commit comments

Comments
 (0)