Skip to content

Commit 026f0d6

Browse files
bilelmoussaouisdroege
authored andcommitted
Re-export preludes
Along with trait names fixes to make it work without colliding with gio traits names
1 parent 0d45141 commit 026f0d6

File tree

17 files changed

+47
-27
lines changed

17 files changed

+47
-27
lines changed

gio-unix/Gir.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ concurrency = "send+sync"
127127
[[object]]
128128
name = "GioUnix.InputStream"
129129
status = "generate"
130-
manual_traits = ["InputStreamExtManual"]
130+
trait_name = "UnixInputStreamExt"
131+
manual_traits = ["UnixInputStreamExtManual"]
131132
[[object.function]]
132133
name = "new"
133134
# has to use RawFd
@@ -158,7 +159,8 @@ manual_traits = ["InputStreamExtManual"]
158159
[[object]]
159160
name = "GioUnix.OutputStream"
160161
status = "generate"
161-
manual_traits = ["OutputStreamExtManual"]
162+
trait_name = "UnixOutputStreamExt"
163+
manual_traits = ["UnixOutputStreamExtManual"]
162164
[[object.function]]
163165
name = "new"
164166
# has to use RawFd

gio-unix/src/auto/input_stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl InputStream {
1818
pub const NONE: Option<&'static InputStream> = None;
1919
}
2020

21-
pub trait InputStreamExt: IsA<InputStream> + 'static {
21+
pub trait UnixInputStreamExt: IsA<InputStream> + 'static {
2222
#[doc(alias = "g_unix_input_stream_get_close_fd")]
2323
#[doc(alias = "get_close_fd")]
2424
#[doc(alias = "close-fd")]
@@ -31,4 +31,4 @@ pub trait InputStreamExt: IsA<InputStream> + 'static {
3131
}
3232
}
3333

34-
impl<O: IsA<InputStream>> InputStreamExt for O {}
34+
impl<O: IsA<InputStream>> UnixInputStreamExt for O {}

gio-unix/src/auto/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ pub(crate) mod functions;
3535
pub(crate) mod traits {
3636
pub use super::fd_message::FDMessageExt;
3737
pub use super::file_descriptor_based::FileDescriptorBasedExt;
38-
pub use super::input_stream::InputStreamExt;
39-
pub use super::output_stream::OutputStreamExt;
38+
pub use super::input_stream::UnixInputStreamExt;
39+
pub use super::output_stream::UnixOutputStreamExt;
4040
}

gio-unix/src/auto/output_stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl OutputStream {
1818
pub const NONE: Option<&'static OutputStream> = None;
1919
}
2020

21-
pub trait OutputStreamExt: IsA<OutputStream> + 'static {
21+
pub trait UnixOutputStreamExt: IsA<OutputStream> + 'static {
2222
#[doc(alias = "g_unix_output_stream_get_close_fd")]
2323
#[doc(alias = "get_close_fd")]
2424
#[doc(alias = "close-fd")]
@@ -31,4 +31,4 @@ pub trait OutputStreamExt: IsA<OutputStream> + 'static {
3131
}
3232
}
3333

34-
impl<O: IsA<OutputStream>> OutputStreamExt for O {}
34+
impl<O: IsA<OutputStream>> UnixOutputStreamExt for O {}

gio-unix/src/input_stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl AsFd for InputStream {
4747
}
4848
}
4949

50-
pub trait InputStreamExtManual: IsA<InputStream> + Sized {
50+
pub trait UnixInputStreamExtManual: IsA<InputStream> + Sized {
5151
// rustdoc-stripper-ignore-next
5252
/// Sets whether the fd of this stream will be closed when the stream is closed.
5353
///
@@ -60,4 +60,4 @@ pub trait InputStreamExtManual: IsA<InputStream> + Sized {
6060
}
6161
}
6262

63-
impl<O: IsA<InputStream>> InputStreamExtManual for O {}
63+
impl<O: IsA<InputStream>> UnixInputStreamExtManual for O {}

gio-unix/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ pub mod functions {
2525
}
2626

2727
pub mod prelude {
28+
pub use gio::prelude::*;
29+
2830
pub use super::auto::traits::*;
2931

3032
#[cfg(feature = "v2_58")]
3133
pub use crate::desktop_app_info::DesktopAppInfoExtManual;
3234

3335
pub use crate::fd_message::FDMessageExtManual;
3436
pub use crate::file_descriptor_based::FileDescriptorBasedExtManual;
35-
pub use crate::input_stream::InputStreamExtManual;
36-
pub use crate::output_stream::OutputStreamExtManual;
37+
pub use crate::input_stream::UnixInputStreamExtManual;
38+
pub use crate::output_stream::UnixOutputStreamExtManual;
3739
}

gio-unix/src/output_stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl AsFd for OutputStream {
5050
}
5151
}
5252

53-
pub trait OutputStreamExtManual: IsA<OutputStream> + Sized {
53+
pub trait UnixOutputStreamExtManual: IsA<OutputStream> + Sized {
5454
// rustdoc-stripper-ignore-next
5555
/// Sets whether the fd of this stream will be closed when the stream is closed.
5656
///
@@ -66,4 +66,4 @@ pub trait OutputStreamExtManual: IsA<OutputStream> + Sized {
6666
}
6767
}
6868

69-
impl<O: IsA<OutputStream>> OutputStreamExtManual for O {}
69+
impl<O: IsA<OutputStream>> UnixOutputStreamExtManual for O {}

gio-win32/Gir.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ status = "generate"
3030
[[object]]
3131
name = "GioWin32.InputStream"
3232
status = "generate"
33-
manual_traits = ["InputStreamExtManual"]
33+
trait_name = "Win32InputStreamExt"
34+
manual_traits = ["Win32InputStreamExtManual"]
3435
[[object.function]]
3536
name = "new"
3637
manual = true
@@ -44,7 +45,8 @@ manual_traits = ["InputStreamExtManual"]
4445
[[object]]
4546
name = "GioWin32.OutputStream"
4647
status = "generate"
47-
manual_traits = ["OutputStreamExtManual"]
48+
trait_name = "Win32OutputStreamExt"
49+
manual_traits = ["Win32OutputStreamExtManual"]
4850
[[object.function]]
4951
name = "new"
5052
manual = true

gio-win32/src/auto/input_stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl InputStream {
2323
pub const NONE: Option<&'static InputStream> = None;
2424
}
2525

26-
pub trait InputStreamExt: IsA<InputStream> + 'static {
26+
pub trait Win32InputStreamExt: IsA<InputStream> + 'static {
2727
#[doc(alias = "g_win32_input_stream_get_close_handle")]
2828
#[doc(alias = "get_close_handle")]
2929
#[doc(alias = "close-handle")]
@@ -71,4 +71,4 @@ pub trait InputStreamExt: IsA<InputStream> + 'static {
7171
}
7272
}
7373

74-
impl<O: IsA<InputStream>> InputStreamExt for O {}
74+
impl<O: IsA<InputStream>> Win32InputStreamExt for O {}

gio-win32/src/auto/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ pub use self::output_stream::OutputStream;
1111
pub(crate) mod functions;
1212

1313
pub(crate) mod traits {
14-
pub use super::input_stream::InputStreamExt;
15-
pub use super::output_stream::OutputStreamExt;
14+
pub use super::input_stream::Win32InputStreamExt;
15+
pub use super::output_stream::Win32OutputStreamExt;
1616
}

0 commit comments

Comments
 (0)