From: Colin Walters Date: Sat, 31 Jul 2021 21:15:03 +0000 (-0400) Subject: Re-export glib, gio X-Git-Tag: archive/raspbian/2022.4-1+rpi1^2~9^2^2~20^2~65 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=deedffde068c95b9ee2c3d5f1604b3a3e534093f;p=ostree.git Re-export glib, gio Re-export our dependencies. See https://gtk-rs.org/blog/2021/06/22/new-release.html "Dependencies are re-exported". Users will need e.g. `gio::File`, so this avoids them needing to update matching versions. Closes: https://github.com/ostreedev/ostree-rs/issues/12 --- diff --git a/rust-bindings/rust/src/lib.rs b/rust-bindings/rust/src/lib.rs index 78f4a001..8919c232 100644 --- a/rust-bindings/rust/src/lib.rs +++ b/rust-bindings/rust/src/lib.rs @@ -6,6 +6,12 @@ #![doc(html_root_url = "https://fkrull.gitlab.io/ostree-rs")] +// Re-export our dependencies. See https://gtk-rs.org/blog/2021/06/22/new-release.html +// "Dependencies are re-exported". Users will need e.g. `gio::File`, so this avoids +// them needing to update matching versions. +pub use gio; +pub use glib; + // code generated by gir #[rustfmt::skip] #[allow(clippy::all)] @@ -59,4 +65,9 @@ mod tests; // prelude pub mod prelude { pub use crate::auto::traits::*; + // See "Re-export dependencies above". + #[doc(hidden)] + pub use gio::prelude::*; + #[doc(hidden)] + pub use glib::prelude::*; } diff --git a/rust-bindings/rust/tests/repo/mod.rs b/rust-bindings/rust/tests/repo/mod.rs index ab23032c..6bf045b6 100644 --- a/rust-bindings/rust/tests/repo/mod.rs +++ b/rust-bindings/rust/tests/repo/mod.rs @@ -1,6 +1,7 @@ use crate::util::*; -use gio::{prelude::*, NONE_CANCELLABLE}; -use ostree::{ObjectType, *}; +use ostree::gio::NONE_CANCELLABLE; +use ostree::prelude::*; +use ostree::{ObjectName, ObjectType}; #[cfg(feature = "v2016_8")] mod checkout_at;