mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
Start taking out futures feature
This commit is contained in:
parent
241806b757
commit
3e70feb75f
@ -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
|
||||
|
@ -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"]
|
||||
|
@ -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
|
||||
|
@ -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<P: IsA<gio::InputStream> + 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,
|
||||
|
Loading…
Reference in New Issue
Block a user