Skip to content

Commit

Permalink
Merge pull request #1248 from MajorBreakfast/alpha-5
Browse files Browse the repository at this point in the history
Revert usage of crate renaming features, alpha.5
  • Loading branch information
MajorBreakfast committed Sep 3, 2018
2 parents 8b48b59 + 7213267 commit e344008
Show file tree
Hide file tree
Showing 26 changed files with 83 additions and 80 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ matrix:
# os: linux
# script:
# - cargo update -Zminimal-versions
# - cargo test --all --all-features
# - cargo test --all

- name: cargo clippy
rust: nightly
script:
- if rustup component add clippy-preview;
then
cargo clippy --all --all-features -- -Dwarnings;
cargo clippy --all -- -Dwarnings;
else
echo 'Skipping clippy';
fi
Expand Down Expand Up @@ -70,8 +70,8 @@ matrix:
- cargo doc

script:
- cargo test --all --all-features
- cargo test --all --all-features --release
- cargo test --all
- cargo test --all --release

env:
global:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# 0.3.0-alpha.5 - 2018-09-03
* Revert usage of cargo crate renaming feature

# 0.3.0-alpha.4 - 2018-09-02
**Note: This release does not work, use `0.3.0-alpha.5` instead**

* `future::ok` and `future:err` to create result wrapping futures (similar to `future::ready`)
* `futures-test` crate with testing utilities
* `StreamExt::boxed` combinator
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</p>

<p align="center">
<a href="https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures/">
<a href="https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures/">
Documentation
</a> | <a href="https://rust-lang-nursery.github.io/futures-rs/">
Website
Expand All @@ -30,7 +30,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
futures-preview = "0.3.0-alpha.4"
futures-preview = "0.3.0-alpha.5"
```

Now, you can use futures-rs:
Expand All @@ -47,7 +47,7 @@ a `#[no_std]` environment, use:

```toml
[dependencies]
futures-preview = { version = "0.3.0-alpha.4", default-features = false }
futures-preview = { version = "0.3.0-alpha.5", default-features = false }
```

# License
Expand Down
8 changes: 4 additions & 4 deletions futures-channel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cargo-features = ["edition"]
[package]
name = "futures-channel-preview"
edition = "2018"
version = "0.3.0-alpha.4"
version = "0.3.0-alpha.5"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang-nursery/futures-rs"
homepage = "https://rust-lang-nursery.github.io/futures-rs"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_channel"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_channel"
description = """
Channels for asynchronous communication using futures-rs.
"""
Expand All @@ -21,8 +21,8 @@ std = ["futures-core-preview/std"]
default = ["std"]

[dependencies]
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.4", default-features = false }
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.5", default-features = false }

[dev-dependencies]
futures-preview = { path = "../futures", version = "0.3.0-alpha.4", default-features = true }
futures-preview = { path = "../futures", version = "0.3.0-alpha.5", default-features = true }
pin-utils = "0.1.0-alpha.2"
2 changes: 1 addition & 1 deletion futures-channel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#![warn(missing_docs, missing_debug_implementations)]
#![deny(bare_trait_objects)]

#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_channel")]
#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_channel")]

macro_rules! if_std {
($($i:item)*) => ($(
Expand Down
4 changes: 2 additions & 2 deletions futures-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cargo-features = ["edition"]
[package]
name = "futures-core-preview"
edition = "2018"
version = "0.3.0-alpha.4"
version = "0.3.0-alpha.5"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang-nursery/futures-rs"
homepage = "https://rust-lang-nursery.github.io/futures-rs"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_core"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_core"
description = """
The core traits and types in for the `futures` library.
"""
Expand Down
2 changes: 1 addition & 1 deletion futures-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#![warn(missing_docs, missing_debug_implementations)]
#![deny(bare_trait_objects)]

#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_core")]
#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_core")]

#[doc(hidden)] pub use crate::future::Future;
#[doc(hidden)] pub use crate::future::TryFuture;
Expand Down
14 changes: 7 additions & 7 deletions futures-executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cargo-features = ["edition"]
[package]
name = "futures-executor-preview"
edition = "2018"
version = "0.3.0-alpha.4"
version = "0.3.0-alpha.5"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang-nursery/futures-rs"
homepage = "https://rust-lang-nursery.github.io/futures-rs"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_executor"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_executor"
description = """
Executors for asynchronous tasks based on the futures-rs library.
"""
Expand All @@ -21,13 +21,13 @@ std = ["num_cpus", "futures-core-preview/std", "futures-util-preview/std", "futu
default = ["std"]

[dependencies]
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.4", default-features = false}
futures-util-preview = { path = "../futures-util", version = "0.3.0-alpha.4", default-features = false}
futures-channel-preview = { path = "../futures-channel", version = "0.3.0-alpha.4", default-features = false}
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.5", default-features = false}
futures-util-preview = { path = "../futures-util", version = "0.3.0-alpha.5", default-features = false}
futures-channel-preview = { path = "../futures-channel", version = "0.3.0-alpha.5", default-features = false}
num_cpus = { version = "1.8.0", optional = true }
lazy_static = { version = "1.1.0", optional = true }
pin-utils = "0.1.0-alpha.2"

[dev-dependencies]
futures-preview = { path = "../futures", version = "0.3.0-alpha.4" }
futures-channel-preview = { path = "../futures-channel", version = "0.3.0-alpha.4" }
futures-preview = { path = "../futures", version = "0.3.0-alpha.5" }
futures-channel-preview = { path = "../futures-channel", version = "0.3.0-alpha.5" }
2 changes: 1 addition & 1 deletion futures-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#![warn(missing_docs, missing_debug_implementations)]
#![deny(bare_trait_objects)]

#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_executor")]
#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_executor")]

macro_rules! if_std {
($($i:item)*) => ($(
Expand Down
8 changes: 4 additions & 4 deletions futures-io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cargo-features = ["edition"]
[package]
name = "futures-io-preview"
edition = "2018"
version = "0.3.0-alpha.4"
version = "0.3.0-alpha.5"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang-nursery/futures-rs"
homepage = "https://rust-lang-nursery.github.io/futures-rs"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_io"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_io"
description = """
The `AsyncRead` and `AsyncWrite` traits for the futures-rs library.
"""
Expand All @@ -21,9 +21,9 @@ std = ["futures-core-preview/std", "iovec"]
default = ["std"]

[dependencies]
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.4", default-features = false }
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.5", default-features = false }
iovec = { version = "0.1", optional = true }

[dev-dependencies]
futures-preview = { path = "../futures", version = "0.3.0-alpha.4" }
futures-preview = { path = "../futures", version = "0.3.0-alpha.5" }
assert_matches = "1.3.0"
2 changes: 1 addition & 1 deletion futures-io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#![warn(missing_docs, missing_debug_implementations)]
#![deny(bare_trait_objects)]

#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_io")]
#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_io")]

#![feature(futures_api)]

Expand Down
8 changes: 4 additions & 4 deletions futures-sink/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cargo-features = ["edition"]
[package]
name = "futures-sink-preview"
edition = "2018"
version = "0.3.0-alpha.4"
version = "0.3.0-alpha.5"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang-nursery/futures-rs"
homepage = "https://rust-lang-nursery.github.io/futures-rs"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_sink"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_sink"
description = """
The asynchronous `Sink` trait for the futures-rs library.
"""
Expand All @@ -22,5 +22,5 @@ default = ["std"]

[dependencies]
either = { version = "1.4", default-features = false, optional = true }
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.4", default-features = false }
futures-channel-preview = { path = "../futures-channel", version = "0.3.0-alpha.4", default-features = false }
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.5", default-features = false }
futures-channel-preview = { path = "../futures-channel", version = "0.3.0-alpha.5", default-features = false }
2 changes: 1 addition & 1 deletion futures-sink/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#![no_std]
#![warn(missing_docs, missing_debug_implementations)]
#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_sink")]
#![doc(html_root_url = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_sink")]

#![feature(pin, arbitrary_self_types, futures_api)]

Expand Down
4 changes: 2 additions & 2 deletions futures-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cargo-features = ["edition"]
[package]
name = "futures-test-preview"
edition = "2018"
version = "0.3.0-alpha.4"
version = "0.3.0-alpha.5"
authors = ["Wim Looman <wim@nemo157.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang-nursery/futures-rs"
homepage = "https://rust-lang-nursery.github.io/futures-rs"
documentation = "https://rust-lang-nursery.github.io/futures-doc/0.3.0-alpha.4/futures_test"
documentation = "https://rust-lang-nursery.github.io/futures-doc/0.3.0-alpha.5/futures_test"
description = """
Common utilities for testing components built off futures-rs.
"""
Expand Down
2 changes: 1 addition & 1 deletion futures-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#![warn(missing_docs, missing_debug_implementations)]
#![deny(bare_trait_objects)]
#![doc(
html_root_url = "https://rust-lang-nursery.github.io/futures-doc/0.3.0-alpha.4/futures_test"
html_root_url = "https://rust-lang-nursery.github.io/futures-doc/0.3.0-alpha.5/futures_test"
)]

#[doc(hidden)]
Expand Down
24 changes: 11 additions & 13 deletions futures-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
cargo-features = ["edition", "rename-dependency"]
cargo-features = ["edition"]

[package]
name = "futures-util-preview"
edition = "2018"
version = "0.3.0-alpha.4"
version = "0.3.0-alpha.5"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang-nursery/futures-rs"
homepage = "https://rust-lang-nursery.github.io/futures-rs"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.4/futures_util"
documentation = "https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.5/futures_util"
description = """
Common utilities and extension traits for the futures-rs library.
"""
Expand All @@ -19,24 +19,22 @@ name = "futures_util"
[features]
std = ["futures-core-preview/std", "futures-io-preview/std", "futures-sink-preview/std", "either/use_std", "slab"]
default = ["std", "futures-core-preview/either", "futures-sink-preview/either"]
compat = ["std", "futures01"]
compat = ["std", "futures"]
tokio-compat = ["compat", "tokio-executor"]
bench = []
nightly = []

[dependencies]
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.4", default-features = false }
futures-channel-preview = { path = "../futures-channel", version = "0.3.0-alpha.4", default-features = false }
futures-io-preview = { path = "../futures-io", version = "0.3.0-alpha.4", default-features = false }
futures-sink-preview = { path = "../futures-sink", version = "0.3.0-alpha.4", default-features = false}
futures-core-preview = { path = "../futures-core", version = "0.3.0-alpha.5", default-features = false }
futures-channel-preview = { path = "../futures-channel", version = "0.3.0-alpha.5", default-features = false }
futures-io-preview = { path = "../futures-io", version = "0.3.0-alpha.5", default-features = false }
futures-sink-preview = { path = "../futures-sink", version = "0.3.0-alpha.5", default-features = false}
either = { version = "1.4", default-features = false }
slab = { version = "0.4", optional = true }
futures01 = { package = "futures", version = "0.1", optional = true }
futures = { version = "0.1", optional = true }
tokio-executor = { version = "0.1.2", optional = true }
pin-utils = "0.1.0-alpha.2"

[dev-dependencies]
futures-preview = { path = "../futures", version = "0.3.0-alpha.4", features = ["tokio-compat"] }
futures-executor-preview = { path = "../futures-executor", version = "0.3.0-alpha.4" }
tokio = "0.1.8"
tokio-threadpool = "0.1.6"
futures-preview = { path = "../futures", version = "0.3.0-alpha.5" }
futures-executor-preview = { path = "../futures-executor", version = "0.3.0-alpha.5" }
6 changes: 3 additions & 3 deletions futures-util/src/compat/compat.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// Converts a futures 0.3 [`TryFuture`](futures_core::future::TryFuture),
/// [`TryStream`](futures_core::stream::TryStream) or
/// [`Sink`](futures_sink::Sink) into a futures 0.1
/// [`Future`](futures01::future::Future),
/// [`Stream`](futures01::stream::Stream) or
/// [`Sink`](futures01::sink::Sink) and vice versa.
/// [`Future`](futures::future::Future),
/// [`Stream`](futures::stream::Stream) or
/// [`Sink`](futures::sink::Sink) and vice versa.
#[derive(Debug)]
#[must_use = "futures do nothing unless polled"]
pub struct Compat<T, Sp> {
Expand Down
4 changes: 2 additions & 2 deletions futures-util/src/compat/compat01to03.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use super::Compat;
use futures01::executor::{
use futures::executor::{
self as executor01, UnsafeNotify as UnsafeNotify01,
Notify as Notify01, NotifyHandle as NotifyHandle01,
};
use futures01::{Async as Async01, Future as Future01, Stream as Stream01};
use futures::{Async as Async01, Future as Future01, Stream as Stream01};
use futures_core::{task as task03, Future as Future03, Stream as Stream03};
use std::pin::PinMut;

Expand Down
2 changes: 1 addition & 1 deletion futures-util/src/compat/compat03to01.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::Compat;
use futures01::{
use futures::{
task as task01, Async as Async01, AsyncSink as AsyncSink01,
Future as Future01, Poll as Poll01, Sink as Sink01,
StartSend as StartSend01, Stream as Stream01,
Expand Down
14 changes: 7 additions & 7 deletions futures-util/src/compat/executor.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

use super::Compat;
use crate::{TryFutureExt, FutureExt, future::UnitError};
use futures01::future::Executor as Executor01;
use futures::future::Executor as Executor01;
use futures_core::task::Spawn as Spawn03;
use futures_core::task as task03;
use futures_core::future::FutureObj;

/// A future that can run on a futures 0.1
/// [`Executor`](futures01::future::Executor).
/// [`Executor`](futures::future::Executor).
pub type Executor01Future = Compat<UnitError<FutureObj<'static, ()>>, Box<dyn Spawn03 + Send>>;

/// Extension trait for futures 0.1 [`Executor`](futures01::future::Executor).
/// Extension trait for futures 0.1 [`Executor`](futures::future::Executor).
pub trait Executor01CompatExt: Executor01<Executor01Future> +
Clone + Send + 'static
{
/// Converts a futures 0.1 [`Executor`](futures01::future::Executor) into a
/// Converts a futures 0.1 [`Executor`](futures::future::Executor) into a
/// futures 0.3 [`Spawn`](futures_core::task::Spawn).
///
/// ```
/// ```ignore
/// #![feature(async_await, await_macro, futures_api)]
/// use futures01::Future;
/// use futures::Future;
/// use futures::future::{FutureExt, TryFutureExt};
/// use futures::compat::Executor01CompatExt;
/// use futures::spawn;
Expand Down Expand Up @@ -57,7 +57,7 @@ where Ex: Executor01<Executor01Future> + Clone + Send + 'static
}
}

/// Converts a futures 0.1 [`Executor`](futures01::future::Executor) into a
/// Converts a futures 0.1 [`Executor`](futures::future::Executor) into a
/// futures 0.3 [`Spawn`](futures_core::task::Spawn).
#[derive(Clone)]
pub struct Executor01As03<Ex> {
Expand Down
6 changes: 3 additions & 3 deletions futures-util/src/compat/future01ext.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use super::Compat;
use futures01::Future as Future01;
use futures::Future as Future01;

impl<Fut: Future01> Future01CompatExt for Fut {}

/// Extension trait for futures 0.1 [`Future`](futures01::future::Future)
/// Extension trait for futures 0.1 [`Future`](futures::future::Future)
pub trait Future01CompatExt: Future01 {
/// Converts a futures 0.1
/// [`Future<Item = T, Error = E>`](futures01::future::Future)
/// [`Future<Item = T, Error = E>`](futures::future::Future)
/// into a futures 0.3
/// [`Future<Output = Result<T, E>>`](futures_core::future::Future).
fn compat(self) -> Compat<Self, ()> where Self: Sized {
Expand Down

0 comments on commit e344008

Please sign in to comment.