Skip to content

Commit 8fb14be

Browse files
committed
Revert "Disable async-std and tokio support for now."
This reverts commit ac36f51. Tokio now supports IO Safety: tokio-rs/mio#1745
1 parent 7217fa6 commit 8fb14be

File tree

4 files changed

+0
-23
lines changed

4 files changed

+0
-23
lines changed

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@
1515
This crate defines the [`CharDevice`] struct, a simple wrapper around
1616
`std::fs::File` for character devices.
1717

18-
Support for async-std and tokio is temporarily disabled until those crates
19-
contain the needed implementations of the I/O safety traits.
20-
2118
[`CharDevice`]: https://docs.rs/char-device/latest/char_device/struct.CharDevice.html

src/lib.rs

-8
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,14 @@
44
#![cfg_attr(can_vector, feature(can_vector))]
55
#![cfg_attr(write_all_vectored, feature(write_all_vectored))]
66

7-
/*
87
#[cfg(feature = "async-std")]
98
mod async_std;
10-
*/
119
mod char_device;
12-
/*
1310
#[cfg(feature = "tokio")]
1411
mod tokio;
15-
*/
1612

17-
/*
1813
#[cfg(feature = "async-std")]
1914
pub use crate::async_std::AsyncStdCharDevice;
20-
*/
2115
pub use crate::char_device::CharDevice;
22-
/*
2316
#[cfg(feature = "tokio")]
2417
pub use crate::tokio::TokioCharDevice;
25-
*/

tests/null.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
/*
21
#[cfg(feature = "async-std")]
32
use char_device::AsyncStdCharDevice;
4-
*/
53
use char_device::CharDevice;
6-
/*
74
#[cfg(feature = "tokio")]
85
use char_device::TokioCharDevice;
9-
*/
106

117
#[test]
128
fn null() {
@@ -19,7 +15,6 @@ fn null() {
1915
assert_eq!(char_device.read(&mut buf).unwrap(), 0);
2016
}
2117

22-
/*
2318
#[cfg(feature = "async-std")]
2419
#[async_std::test]
2520
async fn async_std_null() {
@@ -43,4 +38,3 @@ async fn tokio_null() {
4338
let mut buf = vec![0_u8; 32];
4439
assert_eq!(char_device.read(&mut buf).await.unwrap(), 0);
4540
}
46-
*/

tests/tty.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
#![cfg(unix)]
22

3-
/*
43
#[cfg(feature = "async-std")]
54
use char_device::AsyncStdCharDevice;
6-
*/
75
use char_device::CharDevice;
8-
/*
96
#[cfg(feature = "tokio")]
107
use char_device::TokioCharDevice;
11-
*/
128

139
#[test]
1410
fn tty() {
@@ -25,7 +21,6 @@ fn tty() {
2521
};
2622
}
2723

28-
/*
2924
#[cfg(feature = "async-std")]
3025
#[async_std::test]
3126
async fn async_std_tty() {
@@ -57,4 +52,3 @@ async fn tokio_tty() {
5752
},
5853
};
5954
}
60-
*/

0 commit comments

Comments
 (0)