mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +02:00
chore: repo maintenance + no path dependencies (#991)
- Move `tokio` into its own directory. - Remove `path` dependencies. - Run tests with once with crates.io dep and once with patched dep.
This commit is contained in:
@@ -20,7 +20,7 @@ Timer facilities for Tokio
|
||||
|
||||
[dependencies]
|
||||
futures = "0.1.19"
|
||||
tokio-executor = { version = "0.1.1", path = "../tokio-executor" }
|
||||
tokio-executor = "0.1.1"
|
||||
crossbeam-utils = "0.6.0"
|
||||
|
||||
# Backs `DelayQueue`
|
||||
@@ -29,4 +29,4 @@ slab = "0.4.1"
|
||||
[dev-dependencies]
|
||||
rand = "0.6"
|
||||
tokio-mock-task = "0.1.0"
|
||||
tokio = { version = "0.1.7", path = "../" }
|
||||
tokio = "0.1.7"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
extern crate futures;
|
||||
extern crate tokio;
|
||||
extern crate tokio_executor;
|
||||
extern crate tokio_timer;
|
||||
|
||||
@@ -8,13 +7,13 @@ mod support;
|
||||
use support::*;
|
||||
|
||||
use futures::{prelude::*, sync::mpsc};
|
||||
use tokio::util::StreamExt;
|
||||
use tokio_timer::throttle::Throttle;
|
||||
|
||||
#[test]
|
||||
fn throttle() {
|
||||
mocked(|timer, _| {
|
||||
let (tx, rx) = mpsc::unbounded();
|
||||
let mut stream = rx.throttle(ms(1)).map_err(|e| panic!("{:?}", e));
|
||||
let mut stream = Throttle::new(rx, ms(1));
|
||||
|
||||
assert_not_ready!(stream);
|
||||
|
||||
@@ -36,7 +35,7 @@ fn throttle() {
|
||||
fn throttle_dur_0() {
|
||||
mocked(|_, _| {
|
||||
let (tx, rx) = mpsc::unbounded();
|
||||
let mut stream = rx.throttle(ms(0)).map_err(|e| panic!("{:?}", e));
|
||||
let mut stream = Throttle::new(rx, ms(0));
|
||||
|
||||
assert_not_ready!(stream);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user