diff --git a/rust-bindings/rust/.gitlab-ci.yml b/rust-bindings/rust/.gitlab-ci.yml index dbc27fd5..b3d081dd 100644 --- a/rust-bindings/rust/.gitlab-ci.yml +++ b/rust-bindings/rust/.gitlab-ci.yml @@ -33,8 +33,8 @@ check: build_all-features: stage: build script: - - cargo clippy --all --features latest,futures -- -D warnings - - cargo test --verbose --all --features latest,futures + - cargo clippy --all --features latest -- -D warnings + - cargo test --verbose --all --features latest build_default-features: stage: build @@ -58,7 +58,7 @@ docs: script: - make merge-lgpl-docs - cargo rustdoc --verbose --package ostree-sys --features dox -- ${RUSTDOC_OPTS} - - cargo rustdoc --verbose --package ostree --features dox,futures -- ${RUSTDOC_OPTS} + - cargo rustdoc --verbose --package ostree --features dox -- ${RUSTDOC_OPTS} artifacts: paths: - target/doc diff --git a/rust-bindings/rust/Cargo.toml b/rust-bindings/rust/Cargo.toml index af08d396..c5706327 100644 --- a/rust-bindings/rust/Cargo.toml +++ b/rust-bindings/rust/Cargo.toml @@ -20,7 +20,7 @@ exclude = [ ] [package.metadata.docs.rs] -features = ["dox", "futures"] +features = ["dox"] [badges.gitlab] repository = "fkrull/ostree-rs" @@ -29,13 +29,11 @@ repository = "fkrull/ostree-rs" name = "ostree" [workspace] -members = ["sys"] +members = [".", "sys"] [dependencies] libc = "0.2" bitflags = "1" -fragile = { version = "0.3.0", optional = true } -futures-preview = { version = "0.3.0-alpha", optional = true } lazy_static = "1.1" glib = "0.9.0" gio = "0.8.0" @@ -51,7 +49,6 @@ tempfile = "3" [features] dox = ["ostree-sys/dox"] -futures = ["futures-preview", "fragile", "gio/futures", "glib/futures"] v2014_9 = ["ostree-sys/v2014_9"] v2015_7 = ["v2014_9", "ostree-sys/v2015_7"] v2016_4 = ["v2015_7", "ostree-sys/v2016_4"] diff --git a/rust-bindings/rust/src/lib.rs b/rust-bindings/rust/src/lib.rs index f35ff5c6..0e29c88d 100644 --- a/rust-bindings/rust/src/lib.rs +++ b/rust-bindings/rust/src/lib.rs @@ -18,12 +18,6 @@ extern crate libc; extern crate bitflags; #[macro_use] extern crate lazy_static; -#[cfg(feature = "futures")] -extern crate fragile; -#[cfg(feature = "futures")] -extern crate futures; - -use glib::Error; // code generated by gir #[rustfmt::skip] @@ -35,26 +29,33 @@ pub use crate::auto::*; // handwritten code mod checksum; +pub use crate::checksum::*; + #[cfg(any(feature = "v2018_6", feature = "dox"))] mod collection_ref; -mod functions; -#[cfg(any(feature = "v2019_3", feature = "dox"))] -mod kernel_args; -mod object_name; -mod repo; -#[cfg(any(feature = "v2018_2", feature = "dox"))] -mod repo_checkout_at_options; -mod se_policy; -pub use crate::checksum::*; #[cfg(any(feature = "v2018_6", feature = "dox"))] pub use crate::collection_ref::*; + +mod functions; pub use crate::functions::*; + +#[cfg(any(feature = "v2019_3", feature = "dox"))] +mod kernel_args; #[cfg(any(feature = "v2019_3", feature = "dox"))] pub use crate::kernel_args::*; + +mod object_name; pub use crate::object_name::*; + +mod repo; pub use crate::repo::*; + +#[cfg(any(feature = "v2018_2", feature = "dox"))] +mod repo_checkout_at_options; #[cfg(any(feature = "v2018_2", feature = "dox"))] pub use crate::repo_checkout_at_options::*; + +mod se_policy; pub use crate::se_policy::*; // tests diff --git a/rust-bindings/rust/src/repo.rs b/rust-bindings/rust/src/repo.rs index 3098ce2d..da255f56 100644 --- a/rust-bindings/rust/src/repo.rs +++ b/rust-bindings/rust/src/repo.rs @@ -1,8 +1,6 @@ #[cfg(any(feature = "v2016_4", feature = "dox"))] use crate::RepoListRefsExtFlags; use crate::{Checksum, ObjectName, ObjectType, Repo}; -#[cfg(feature = "futures")] -use futures::future; use gio; use gio_sys; use glib; @@ -11,8 +9,6 @@ use glib::Error; use glib::IsA; use glib_sys; use ostree_sys; -#[cfg(feature = "futures")] -use std::boxed::Box as Box_; use std::collections::{HashMap, HashSet}; use std::path::Path; use std::{mem::MaybeUninit, ptr}; @@ -225,7 +221,6 @@ impl Repo { } } - #[cfg(feature = "futures")] pub fn write_content_async_future + Clone + 'static>( &self, expected_checksum: Option<&str>, @@ -306,7 +301,6 @@ impl Repo { } } - #[cfg(feature = "futures")] pub fn write_metadata_async_future( &self, objtype: ObjectType,