parent
6963f0b497
commit
ddf87aec63
@ -0,0 +1 @@
|
|||||||
|
/async-task-1.0.0.crate
|
@ -0,0 +1,210 @@
|
|||||||
|
From 226b2529314d5a4c3e6c8d4620926abb4508751a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yuki Okushi <huyuumi.dev@gmail.com>
|
||||||
|
Date: Sun, 1 Sep 2019 03:46:57 +0900
|
||||||
|
Subject: [PATCH] Remove `async_await` feature gates (#4)
|
||||||
|
|
||||||
|
---
|
||||||
|
benches/bench.rs | 2 +-
|
||||||
|
examples/panic-propagation.rs | 2 --
|
||||||
|
examples/panic-result.rs | 2 --
|
||||||
|
examples/spawn-on-thread.rs | 2 --
|
||||||
|
examples/spawn.rs | 2 --
|
||||||
|
examples/task-id.rs | 2 --
|
||||||
|
src/lib.rs | 6 ------
|
||||||
|
src/task.rs | 2 --
|
||||||
|
tests/basic.rs | 2 --
|
||||||
|
tests/join.rs | 2 --
|
||||||
|
tests/panic.rs | 2 --
|
||||||
|
tests/ready.rs | 2 --
|
||||||
|
tests/waker_panic.rs | 2 --
|
||||||
|
tests/waker_pending.rs | 2 --
|
||||||
|
tests/waker_ready.rs | 2 --
|
||||||
|
15 files changed, 1 insertion(+), 33 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/benches/bench.rs b/benches/bench.rs
|
||||||
|
index 6fd7935..c8f43d1 100644
|
||||||
|
--- a/benches/bench.rs
|
||||||
|
+++ b/benches/bench.rs
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#![feature(async_await, test)]
|
||||||
|
+#![feature(test)]
|
||||||
|
|
||||||
|
extern crate test;
|
||||||
|
|
||||||
|
diff --git a/examples/panic-propagation.rs b/examples/panic-propagation.rs
|
||||||
|
index 9c4f081..8a5339f 100644
|
||||||
|
--- a/examples/panic-propagation.rs
|
||||||
|
+++ b/examples/panic-propagation.rs
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
//! A single-threaded executor where join handles propagate panics from tasks.
|
||||||
|
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::future::Future;
|
||||||
|
use std::panic::{resume_unwind, AssertUnwindSafe};
|
||||||
|
use std::pin::Pin;
|
||||||
|
diff --git a/examples/panic-result.rs b/examples/panic-result.rs
|
||||||
|
index b1200a3..7cf5a14 100644
|
||||||
|
--- a/examples/panic-result.rs
|
||||||
|
+++ b/examples/panic-result.rs
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
//! A single-threaded executor where join handles catch panics inside tasks.
|
||||||
|
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::future::Future;
|
||||||
|
use std::panic::AssertUnwindSafe;
|
||||||
|
use std::thread;
|
||||||
|
diff --git a/examples/spawn-on-thread.rs b/examples/spawn-on-thread.rs
|
||||||
|
index 6d5b9a2..22da0c5 100644
|
||||||
|
--- a/examples/spawn-on-thread.rs
|
||||||
|
+++ b/examples/spawn-on-thread.rs
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
//! A function that runs a future to completion on a dedicated thread.
|
||||||
|
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::future::Future;
|
||||||
|
use std::sync::Arc;
|
||||||
|
use std::thread;
|
||||||
|
diff --git a/examples/spawn.rs b/examples/spawn.rs
|
||||||
|
index 6e798c0..4af5a02 100644
|
||||||
|
--- a/examples/spawn.rs
|
||||||
|
+++ b/examples/spawn.rs
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
//! A simple single-threaded executor.
|
||||||
|
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::future::Future;
|
||||||
|
use std::panic::catch_unwind;
|
||||||
|
use std::thread;
|
||||||
|
diff --git a/examples/task-id.rs b/examples/task-id.rs
|
||||||
|
index b3832d0..66b7aec 100644
|
||||||
|
--- a/examples/task-id.rs
|
||||||
|
+++ b/examples/task-id.rs
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
//! An executor that assigns an ID to every spawned task.
|
||||||
|
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::cell::Cell;
|
||||||
|
use std::future::Future;
|
||||||
|
use std::panic::catch_unwind;
|
||||||
|
diff --git a/src/lib.rs b/src/lib.rs
|
||||||
|
index 2894cd1..153cb43 100644
|
||||||
|
--- a/src/lib.rs
|
||||||
|
+++ b/src/lib.rs
|
||||||
|
@@ -11,8 +11,6 @@
|
||||||
|
//! All executors have some kind of queue that holds runnable tasks:
|
||||||
|
//!
|
||||||
|
//! ```
|
||||||
|
-//! # #![feature(async_await)]
|
||||||
|
-//! #
|
||||||
|
//! let (sender, receiver) = crossbeam::channel::unbounded();
|
||||||
|
//! #
|
||||||
|
//! # // A future that will get spawned.
|
||||||
|
@@ -28,8 +26,6 @@
|
||||||
|
//! A task is constructed using the [`spawn`] function:
|
||||||
|
//!
|
||||||
|
//! ```
|
||||||
|
-//! # #![feature(async_await)]
|
||||||
|
-//! #
|
||||||
|
//! # let (sender, receiver) = crossbeam::channel::unbounded();
|
||||||
|
//! #
|
||||||
|
//! // A future that will be spawned.
|
||||||
|
@@ -56,8 +52,6 @@
|
||||||
|
//! runnable tasks out of the queue and running each one in order:
|
||||||
|
//!
|
||||||
|
//! ```no_run
|
||||||
|
-//! # #![feature(async_await)]
|
||||||
|
-//! #
|
||||||
|
//! # let (sender, receiver) = crossbeam::channel::unbounded();
|
||||||
|
//! #
|
||||||
|
//! # // A future that will get spawned.
|
||||||
|
diff --git a/src/task.rs b/src/task.rs
|
||||||
|
index b09f602..9097f44 100644
|
||||||
|
--- a/src/task.rs
|
||||||
|
+++ b/src/task.rs
|
||||||
|
@@ -22,8 +22,6 @@ use crate::JoinHandle;
|
||||||
|
/// # Examples
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
-/// # #![feature(async_await)]
|
||||||
|
-/// #
|
||||||
|
/// use crossbeam::channel;
|
||||||
|
///
|
||||||
|
/// // The future inside the task.
|
||||||
|
diff --git a/tests/basic.rs b/tests/basic.rs
|
||||||
|
index b9e181b..8c8734c 100644
|
||||||
|
--- a/tests/basic.rs
|
||||||
|
+++ b/tests/basic.rs
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::future::Future;
|
||||||
|
use std::pin::Pin;
|
||||||
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
diff --git a/tests/join.rs b/tests/join.rs
|
||||||
|
index e082939..4bfa7fd 100644
|
||||||
|
--- a/tests/join.rs
|
||||||
|
+++ b/tests/join.rs
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::cell::Cell;
|
||||||
|
use std::future::Future;
|
||||||
|
use std::pin::Pin;
|
||||||
|
diff --git a/tests/panic.rs b/tests/panic.rs
|
||||||
|
index 68058a2..ef917dc 100644
|
||||||
|
--- a/tests/panic.rs
|
||||||
|
+++ b/tests/panic.rs
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::future::Future;
|
||||||
|
use std::panic::catch_unwind;
|
||||||
|
use std::pin::Pin;
|
||||||
|
diff --git a/tests/ready.rs b/tests/ready.rs
|
||||||
|
index ecca328..abdeb90 100644
|
||||||
|
--- a/tests/ready.rs
|
||||||
|
+++ b/tests/ready.rs
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::future::Future;
|
||||||
|
use std::pin::Pin;
|
||||||
|
use std::task::{Context, Poll};
|
||||||
|
diff --git a/tests/waker_panic.rs b/tests/waker_panic.rs
|
||||||
|
index a683f26..3a8dfe8 100644
|
||||||
|
--- a/tests/waker_panic.rs
|
||||||
|
+++ b/tests/waker_panic.rs
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::cell::Cell;
|
||||||
|
use std::future::Future;
|
||||||
|
use std::panic::catch_unwind;
|
||||||
|
diff --git a/tests/waker_pending.rs b/tests/waker_pending.rs
|
||||||
|
index 547ff7a..96d9c6b 100644
|
||||||
|
--- a/tests/waker_pending.rs
|
||||||
|
+++ b/tests/waker_pending.rs
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::future::Future;
|
||||||
|
use std::pin::Pin;
|
||||||
|
use std::task::Waker;
|
||||||
|
diff --git a/tests/waker_ready.rs b/tests/waker_ready.rs
|
||||||
|
index e64cc55..800d6ae 100644
|
||||||
|
--- a/tests/waker_ready.rs
|
||||||
|
+++ b/tests/waker_ready.rs
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#![feature(async_await)]
|
||||||
|
-
|
||||||
|
use std::cell::Cell;
|
||||||
|
use std::future::Future;
|
||||||
|
use std::pin::Pin;
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
--- async-task-1.0.0/Cargo.toml 1970-01-01T00:00:00+00:00
|
||||||
|
+++ async-task-1.0.0/Cargo.toml 2019-12-20T15:20:09.327557+00:00
|
||||||
|
@@ -23,12 +23,12 @@
|
||||||
|
license = "Apache-2.0/MIT"
|
||||||
|
repository = "https://github.com/async-rs/async-task"
|
||||||
|
[dependencies.crossbeam-utils]
|
||||||
|
-version = "0.6.5"
|
||||||
|
+version = "0.7.0"
|
||||||
|
[dev-dependencies.crossbeam]
|
||||||
|
-version = "0.7.1"
|
||||||
|
+version = "0.7.3"
|
||||||
|
|
||||||
|
-[dev-dependencies.futures-preview]
|
||||||
|
-version = "0.3.0-alpha.17"
|
||||||
|
+[dev-dependencies.futures]
|
||||||
|
+version = "0.3.1"
|
||||||
|
|
||||||
|
[dev-dependencies.lazy_static]
|
||||||
|
-version = "1.3.0"
|
||||||
|
+version = "1.4.0"
|
@ -0,0 +1,80 @@
|
|||||||
|
# Generated by rust2rpm 13
|
||||||
|
%bcond_without check
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
%global crate async-task
|
||||||
|
|
||||||
|
Name: rust-%{crate}
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Task abstraction for building executors
|
||||||
|
|
||||||
|
# Upstream license specification: Apache-2.0/MIT
|
||||||
|
License: ASL 2.0 or MIT
|
||||||
|
URL: https://crates.io/crates/async-task
|
||||||
|
Source: %{crates_source}
|
||||||
|
# Initial patched metadata
|
||||||
|
# * Update dependencies, https://github.com/async-rs/async-task/commit/68ab7bfd21775b216b32c2ea6acaa946a8bff14a
|
||||||
|
Patch0: async-task-fix-metadata.diff
|
||||||
|
# https://github.com/async-rs/async-task/commit/226b2529314d5a4c3e6c8d4620926abb4508751a
|
||||||
|
Patch0001: 0001-Remove-async_await-feature-gates-4.patch
|
||||||
|
|
||||||
|
ExclusiveArch: %{rust_arches}
|
||||||
|
%if %{__cargo_skip_build}
|
||||||
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
|
||||||
|
BuildRequires: rust-packaging
|
||||||
|
|
||||||
|
%global _description %{expand:
|
||||||
|
Task abstraction for building executors.}
|
||||||
|
|
||||||
|
%description %{_description}
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages
|
||||||
|
which use "%{crate}" crate.
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%license LICENSE-MIT LICENSE-APACHE
|
||||||
|
%doc README.md CHANGELOG.md
|
||||||
|
%{cargo_registry}/%{crate}-%{version_no_tilde}/
|
||||||
|
|
||||||
|
%package -n %{name}+default-devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{name}+default-devel %{_description}
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages
|
||||||
|
which use "default" feature of "%{crate}" crate.
|
||||||
|
|
||||||
|
%files -n %{name}+default-devel
|
||||||
|
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||||
|
%cargo_prep
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%cargo_generate_buildrequires
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cargo_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cargo_install
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
%cargo_test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Dec 20 16:20:09 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.0-1
|
||||||
|
- Initial package
|
@ -0,0 +1 @@
|
|||||||
|
SHA512 (async-task-1.0.0.crate) = 6beffc693b4df42c434ccba9a9d9bf66feb4cf2f892c2297d5693f797502e294f217983c230bf8c7dd178a8149563ac512d877addba2927cef3e5a04593026de
|
@ -0,0 +1 @@
|
|||||||
|
1
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
standard-inventory-qcow2:
|
||||||
|
qemu:
|
||||||
|
# `cargo test` usually eats more than 1G.
|
||||||
|
m: 4G
|
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
repositories:
|
||||||
|
- repo: "https://src.fedoraproject.org/tests/rust.git"
|
||||||
|
dest: rust
|
||||||
|
tests:
|
||||||
|
- rust/cargo-test
|
||||||
|
environment:
|
||||||
|
pkg: rust-async-task
|
Loading…
Reference in new issue