Skip to content

Commit 27e19a8

Browse files
bilelmoussaouisdroege
authored andcommitted
win32: Guard std::os::windows usage
Otherwise we fail to find std::os::windows when building docs
1 parent 0d73121 commit 27e19a8

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

gio-win32/src/input_stream.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

3+
#[cfg(any(windows, docsrs))]
34
use std::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
45

56
use glib::{prelude::*, translate::*};

gio-win32/src/output_stream.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

3+
#[cfg(any(windows, docsrs))]
34
use std::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
45

56
use glib::{prelude::*, translate::*};

glib-win32/src/functions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::path::PathBuf;
44

55
#[doc(alias = "g_win32_get_package_installation_directory_of_module")]
66
#[doc(alias = "get_package_installation_directory_of_module")]
7+
#[cfg(all(docsrs, windows))]
78
pub fn package_installation_directory_of_module(
89
hmodule: std::os::windows::raw::HANDLE,
910
) -> Result<PathBuf, std::io::Error> {

0 commit comments

Comments
 (0)