mirror of
https://github.com/async-rs/async-std.git
synced 2025-04-24 09:16:46 +00:00
fix warnings
This commit is contained in:
parent
8c0e319e94
commit
36366cd4d9
4 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(deprecated)]
|
||||||
|
|
||||||
use std::cell::UnsafeCell;
|
use std::cell::UnsafeCell;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt::{self, Debug, Display};
|
use std::fmt::{self, Debug, Display};
|
||||||
|
|
|
@ -185,6 +185,7 @@ mod rwlock;
|
||||||
|
|
||||||
cfg_unstable! {
|
cfg_unstable! {
|
||||||
pub use barrier::{Barrier, BarrierWaitResult};
|
pub use barrier::{Barrier, BarrierWaitResult};
|
||||||
|
#[allow(deprecated)]
|
||||||
pub use channel::{channel, Sender, Receiver, RecvError, TryRecvError, TrySendError};
|
pub use channel::{channel, Sender, Receiver, RecvError, TryRecvError, TrySendError};
|
||||||
pub use condvar::Condvar;
|
pub use condvar::Condvar;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#![cfg(feature = "unstable")]
|
#![cfg(feature = "unstable")]
|
||||||
|
#![allow(deprecated)]
|
||||||
|
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
|
@ -5,9 +5,9 @@ use std::task::{Context, Poll};
|
||||||
|
|
||||||
use pin_project_lite::pin_project;
|
use pin_project_lite::pin_project;
|
||||||
|
|
||||||
|
use async_std::channel::bounded as channel;
|
||||||
use async_std::prelude::*;
|
use async_std::prelude::*;
|
||||||
use async_std::stream;
|
use async_std::stream;
|
||||||
use async_std::sync::channel;
|
|
||||||
use async_std::task;
|
use async_std::task;
|
||||||
|
|
||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
|
@ -36,7 +36,7 @@ fn merging_delayed_streams_work() {
|
||||||
|
|
||||||
task::block_on(async move {
|
task::block_on(async move {
|
||||||
task::sleep(std::time::Duration::from_millis(500)).await;
|
task::sleep(std::time::Duration::from_millis(500)).await;
|
||||||
sender.send(92).await;
|
sender.send(92).await.unwrap();
|
||||||
drop(sender);
|
drop(sender);
|
||||||
let xs = t.await;
|
let xs = t.await;
|
||||||
assert_eq!(xs, vec![92])
|
assert_eq!(xs, vec![92])
|
||||||
|
@ -55,7 +55,7 @@ fn merging_delayed_streams_work() {
|
||||||
|
|
||||||
task::block_on(async move {
|
task::block_on(async move {
|
||||||
task::sleep(std::time::Duration::from_millis(500)).await;
|
task::sleep(std::time::Duration::from_millis(500)).await;
|
||||||
sender.send(92).await;
|
sender.send(92).await.unwrap();
|
||||||
drop(sender);
|
drop(sender);
|
||||||
let xs = t.await;
|
let xs = t.await;
|
||||||
assert_eq!(xs, vec![92])
|
assert_eq!(xs, vec![92])
|
||||||
|
|
Loading…
Reference in a new issue