mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-22 00:00:11 +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:
@@ -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