Skip to content

Commit 2fd9743

Browse files
Merge pull request #6 from nurmohammed840/dev
Refactor: Rewrite async net io adapter
2 parents 16813ef + c42178c commit 2fd9743

File tree

17 files changed

+342
-1006
lines changed

17 files changed

+342
-1006
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@ jobs:
2929
- name: Run miri
3030
run: cargo +nightly miri nextest run --no-fail-fast
3131

32+
- name: Run doc test
33+
run: cargo test --doc
34+
3235
- name: Run tests
3336
run: cargo nextest run --no-fail-fast

Cargo.lock

Lines changed: 34 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Add the following dependency to your `Cargo.toml`:
1212

1313
```toml
1414
[dependencies]
15-
nio = "0.0.1"
15+
nio = "0.0.2"
1616
```
1717

1818
Here is a basic echo server example:
1919

20-
```rust
20+
```rust, ignore
2121
use nio::net::TcpListener;
2222
use std::io;
2323
use tokio::io::{AsyncReadExt, AsyncWriteExt};

src/io/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl Events {
2121
))
2222
}
2323

24-
pub fn is_wake(ev: &mio::event::Event) -> bool {
24+
pub fn has_woken(ev: &mio::event::Event) -> bool {
2525
ev.token() == WAKE_TOKEN
2626
}
2727

@@ -33,7 +33,7 @@ impl Events {
3333
self.poll.registry().try_clone()
3434
}
3535

36-
pub fn is_empty(&mut self) -> bool {
36+
pub fn is_empty(&self) -> bool {
3737
self.events.is_empty()
3838
}
3939

0 commit comments

Comments
 (0)