Skip to content

Commit d77c929

Browse files
authored
Gate the shared (posix) module on the target OS (#7777)
## Changelog: N/A
1 parent f9a29c7 commit d77c929

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

utils/host_info/src/backends/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ use icu_locale_core::{
3232

3333
use crate::error::HostInfoError;
3434

35+
#[cfg(any(
36+
target_os = "android",
37+
target_os = "ios",
38+
target_os = "linux",
39+
target_os = "macos",
40+
target_os = "windows"
41+
))]
3542
mod shared;
3643

3744
#[cfg(target_os = "android")]

utils/host_info/src/backends/unavailable.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
// called LICENSE at the top level of the ICU4X source tree
33
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
44

5-
use crate::{
6-
backends::{HostInfoBackend, RawHostInfoBackend},
7-
error::HostInfoError,
8-
};
5+
use crate::backends::{HostInfoBackend, RawHostInfoBackend};
96

107
pub struct UnavailableHostInfoBackend;
118

0 commit comments

Comments
 (0)