Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 5234b5f
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sat Nov 13 12:57:29 2021 +0100

    Release v0.8.0

commit 41a494b
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sat Nov 13 12:59:43 2021 +0100

    Fix Clippy warning

commit a8c5756
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sun Nov 7 12:45:33 2021 +0100

    Add changelog for v0.8

commit 7029a35
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sun Nov 7 12:34:33 2021 +0100

    Add v0.7.14 change log

    From commit 064af84

commit dca2134
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sun Nov 7 11:26:23 2021 +0100

    Fix feature flags for some tests files

    The test util module requires both the "os-poll" and "net" features.

commit b9f089b
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sun Nov 7 11:19:09 2021 +0100

    Remove cfg attributes for Solaris

    We never really supported Solaris, we pretended it implemented epoll,
    but it never did see tokio-rs#1152. As no
    one ever committed to being a maintainer for the port I'm removing it
    now with this commit.

    Instead replace it with illumuos on the CI, which we do support (as it
    supports epoll) and for which we do have maintainers.

commit 7d86108
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sun Nov 7 11:53:32 2021 +0100

    Add section about raw fd to portability guidelines

commit 3be5811
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sun Nov 7 12:09:53 2021 +0100

    Add note about short receive on datagram sockets

    Talking about the differences between OSs.

commit 3ca57f3
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sat Nov 6 15:20:54 2021 +0100

    Document unconnected TcpStream returned by TcpStream::connect

commit 47cf59c
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sat Nov 6 15:04:56 2021 +0100

    Deregister connection before dropping it in TCP example

commit 05009e4
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sat Nov 6 14:53:45 2021 +0100

    Document that Mio report OOB data in Event::is_readable

    Reporting Out-of-band (OOB) as readable it could leave applications open
    to DoS attacks. However because Mio uses edge-triggers most applications
    won't actually be effected.

commit 44666e8
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sat Nov 6 14:41:54 2021 +0100

    Fix match_like_matches_macro Clippy lint

    We've updated our MSVR since the comment above it.

commit f8695a7
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sat Nov 6 14:39:42 2021 +0100

    Update Rustc nightly version in CI

commit f4b9252
Author: Ben Noordhuis <info@bnoordhuis.nl>
Date:   Sun Oct 10 16:45:25 2021 +0200

    Add sys::unix::SocketAddr::as_abstract_namespace()

    Fixes tokio-rs#1517.

commit 04e0ca4
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Tue Sep 28 18:16:01 2021 +0200

    Update change log with v0.7.x releases

    Contains the work in the following commits:
     * v0.7.8 20b7298.
     * v0.7.9 07bc32f.
     * v0.7.10 b7006d7.
     * v0.7.11 772c692.
     * v0.7.12 7adfb75.
     * v0.7.13 75f41fb.

commit e55ec59
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Thu Oct 7 20:21:22 2021 +0200

    Install nightly Rust on CI for install cargo-hack

commit 499004f
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Thu Oct 7 20:14:36 2021 +0200

    Install Cargo-hack using nightly on CI

    Cargo-hack's (transient) dependency bitflags has updated its MSRV.

commit e9e91ff
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Tue Sep 28 19:59:15 2021 +0200

    Fix Clippy warnings on Windows

    Seems this isn't check on the CI.

commit b48cce6
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Tue Sep 28 19:51:19 2021 +0200

    Fix Clippy warnings

commit 37aec3e
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Tue Sep 28 19:45:26 2021 +0200

    Fix dead_code warnings for Windows

commit 02e9be4
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Tue Sep 28 19:32:35 2021 +0200

    Remove TcpSocket type

    The socket2 crate provide all the functionality and more. Furthermore
    supporting all socket options is beyond the scope of Mio.

    The easier migration is to the socket2 crate, using the Socket or
    SockRef types.

    The migration for Tokio is tracked in
    tokio-rs/tokio#4135.

commit d4ce420
Author: Rémi Lauzier <remilauzier@protonmail.com>
Date:   Tue Jul 6 14:21:17 2021 -0400

    Update dev-dependencies

commit fbcc849
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sat Jul 3 12:44:57 2021 +0200

    Change port in connect_error

    Hopefully this port is actually not used.

    Also check Event::is_write_closed since we expect that to be true.

commit bfbcd9d
Author: Jake Shadle <jake.shadle@embark-studios.com>
Date:   Fri Jul 2 15:17:17 2021 +0200

    Move wine from unsupported

commit 21ddf94
Author: Ivan Enderlin <ivan@mnt.io>
Date:   Tue Jun 22 22:36:09 2021 +0200

    chore: Make Clippy happy (bis).

commit 6d62f5d
Author: Ivan Enderlin <ivan@mnt.io>
Date:   Mon Jun 21 16:41:21 2021 +0200

    chore: Make Clippy happy.

commit 6eb1efa
Author: Ivan Enderlin <ivan@mnt.io>
Date:   Mon Jun 21 16:22:16 2021 +0200

    feat: Move `poll::selector` to `Registry::selector`.

commit 441367b
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sun Jun 13 00:33:17 2021 +0200

    Fix Selector::try_clone

    Calls fcntl F_DUPFD_CLOEXEC expects two arguments; the command
    (F_DUPFD_CLOEXEC) and an argument for the command. In this case an lower
    bound for the resulting file descriptor. Because we didn't provide a
    value it would take whatever value was left in the register from
    whatever code used it before the system call.

    This caused Waker::new to fail, see issue
    tokio-rs#1497.

commit cbcaedf
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Sat Jun 12 20:39:12 2021 +0200

    Set FD_CLOEXEC flag on duplicated kqueue Poll

    Same as commit c52635c, but for kqueue.

commit c52635c
Author: Tim Zhang <tim@hyper.sh>
Date:   Tue May 25 11:40:54 2021 +0800

    Set the close-on-exec flag for the duplicate epoll_fd

    The close-on-exec flag (FD_CLOEXEC; see fcntl(2)) for the
    duplicate descriptor created by dup(2) is off.

    We can use fcntl + F_DUPFD_CLOEXEC to dup the epoll_fd to fix this
    issue.

    Fixes: tokio-rs/tokio#3809

    Signed-off-by: Tim Zhang <tim@hyper.sh>

commit 2246ffb
Author: Taiki Endo <te316e89@gmail.com>
Date:   Sun May 23 16:06:15 2021 +0900

    Use ubuntu-18.04 instead of ubuntu-16.04

commit 0cfba5d
Author: cdcode <cdcode@airmail.cc>
Date:   Sun Jun 6 22:42:26 2021 +0100

    Small spelling correction in example

commit 22e8858
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Thu May 13 17:09:57 2021 +0200

    Update outdated comment

commit 607a12f
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Mon May 10 12:10:28 2021 +0200

    Replace x86_64-sun-solaris with x86_64-pc-solaris

    rust-lang/rust#82216 removed the
    x86_64-sun-solaris target from rustup, changing it to use
    x86_64-pc-solaris instead.

    Related issues:
     * rust-lang/rust#85098

commit 27a6a3c
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Mon May 10 11:56:41 2021 +0200

    Avoid cast pointers to usize in windows::NamedPipe

    Changes the Inner::ptr_from_* methods to use ptr::wrapping_sub rather
    then casting to usize.

commit e316b21
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Wed May 5 12:13:47 2021 +0200

    Replace offset constants with methods in Windows NamedPipe

commit 9e13732
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Mon Apr 12 20:26:53 2021 +0200

    Reorder NamedPipe fields

    Moving the Overlapped fields to the start to make it easier to determine
    the offsets and hopefully incur less breakage once external fields
    change size.

    Note that the Overlapped fields internally uses miow::Overlapped, which
    in turn is a OVERLAPPED struct as found in the winapi crate and has a
    stable layout (as defined by the Windows API).

commit db0d74c
Author: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Date:   Mon Apr 12 20:03:24 2021 +0200

    Remove unsound offset_of macro

    And replace it with constants that define the offsets to the fields.
    It's not a pretty solution, but it's one without UB.

commit 1667a70
Author: Rob Ede <robjtede@icloud.com>
Date:   Thu Apr 1 17:01:01 2021 +0100

    remove manual doc versioning
  • Loading branch information
bdbai committed Feb 9, 2022
1 parent 0729d7a commit 535717f
Show file tree
Hide file tree
Showing 56 changed files with 841 additions and 766 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Windows changes
/src/sys/windows/ @carllerche
54 changes: 53 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# 0.8.0

## Removed

* Deprecated features (https://github.com/tokio-rs/mio/commit/105f8f2afb57b01ddea716a0aa9720f226c520e3):
* extra-docs (always enabled)
* tcp (replaced with "net" feature).
* udp (replaced with "net" feature).
* uds (replaced with "net" feature).
* pipe (replaced with "os-ext" feature).
* `TcpSocket` type
(https://github.com/tokio-rs/mio/commit/02e9be41f27daf822575444fdd2b3067433a5996).
The socket2 crate provides all the functionality and more.
* Support for Solaris, it never really worked anyway
(https://github.com/tokio-rs/mio/pull/1528).

## Changes

* Update minimum Rustc version (MSVR) to 1.46.0
(https://github.com/tokio-rs/mio/commit/5c577efecd23750a9a3e0f6ad080ab98f14a255d).

## Added

* `UdpSocket::peer_addr`
(https://github.com/tokio-rs/mio/commit/5fc104d08e0e74c8a19247f7cba0f058699fc438).

# 0.7.14

## Fixes

* Remove use unsound internal macro (#1519).

## Added

* `sys::unix::SocketAddr::as_abstract_namespace()` (#1520).

# 0.7.13

## Fixes

* Fix `Registry::try_clone` invalid usage of `F_DUPFD_CLOEXEC` (#1497,
https://github.com/tokio-rs/mio/commit/2883f5c1f35bf1a59682c5ffc4afe6b97d7d6e68).

# 0.7.12 (yanked)

## Fixes

* Set `FD_CLOEXEC` when calling `Registry::try_clone`
(https://github.com/tokio-rs/mio/commit/d1617b567ff6bc669d71e367d22e0e93ff7e2e24 for epoll and
(https://github.com/tokio-rs/mio/commit/b367a05e408ca90a26383c3aa16d8a16f019dc59 for kqueue).

# 0.7.11

## Fixes
Expand All @@ -12,6 +63,8 @@
* Fix an instance of not doc(cfg(.*))
(https://github.com/tokio-rs/mio/commit/25e8f911357c740034f10a170dfa4ea1b28234ce).

# 0.7.9

## Fixes

* Fix error handling in `NamedPipe::write`
Expand Down Expand Up @@ -46,7 +99,6 @@
themselves already
(https://github.com/tokio-rs/mio/commit/1be481dcbbcb6906364008b5d61e7f53cddc3eb3).


## Fixes

* Underflow in `SocketAddr::address`
Expand Down
20 changes: 4 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@
edition = "2018"
name = "mio"
# When releasing to crates.io:
# - Update html_root_url.
# - Update CHANGELOG.md.
# - Update doc URL.
# - Create git tag
version = "0.7.11"
version = "0.8.0"
license = "MIT"
authors = [
"Carl Lerche <me@carllerche.com>",
"Thomas de Zeeuw <thomasdezeeuw@gmail.com>",
"Tokio Contributors <team@tokio.rs>",
]
description = "Lightweight non-blocking IO"
documentation = "https://docs.rs/mio/0.7.7"
homepage = "https://github.com/tokio-rs/mio"
repository = "https://github.com/tokio-rs/mio"
readme = "README.md"
Expand All @@ -41,14 +38,6 @@ os-ext = ["os-poll"]
# Enables `mio::net` module containing networking primitives.
net = []

# Deprecated features, will be removed in a future version.
extra-docs = [] # Docs are now always present.
tcp = ["net"] # Replaced with "net" feature.
udp = ["net"] # Replaced with "net" feature.
uds = ["net"] # Replaced with "net" feature.
pipe = ["os-ext"] # Replaced with "os-ext" feature.
os-util = ["os-ext"]# Replaced with "os-ext" feature.

[dependencies]
iovec = "0.1.2"
net2 = "0.2.33"
Expand All @@ -63,8 +52,8 @@ winapi = { version = "0.3", features = ["winsock2", "mswsock", "mstcpip"] }
ntapi = "0.3"

[dev-dependencies]
env_logger = { version = "0.6.2", default-features = false }
rand = "0.4"
env_logger = { version = "0.8.4", default-features = false }
rand = "0.8"

[package.metadata.docs.rs]
all-features = true
Expand All @@ -74,15 +63,14 @@ targets = [
"aarch64-linux-android",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-sun-solaris",
"x86_64-unknown-dragonfly",
"x86_64-unknown-freebsd",
"x86_64-unknown-illumos",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-netbsd",
"x86_64-unknown-openbsd",
]


[package.metadata.playground]
features = ["os-poll", "os-ext", "net"]

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Targets available via Rustup that are supported.
TARGETS ?= "aarch64-apple-ios" "aarch64-linux-android" "x86_64-apple-darwin" "x86_64-pc-windows-msvc" "x86_64-sun-solaris" "x86_64-unknown-freebsd" "x86_64-unknown-linux-gnu" "x86_64-unknown-netbsd"
TARGETS ?= "aarch64-apple-ios" "aarch64-linux-android" "x86_64-apple-darwin" "x86_64-pc-windows-msvc" "x86_64-unknown-freebsd" "x86_64-unknown-illumos" "x86_64-unknown-linux-gnu" "x86_64-unknown-netbsd"

test:
cargo test --all-features

# Test everything for the current OS/architecture and check all targets in
# $TARGETS.
test_all: check_all_targets
cargo hack test --feature-powerset --skip guide,extra-docs,tcp,udp,uds,pipe,os-util
cargo hack test --feature-powerset --skip guide,extra-docs,tcp,udp,uds,pipe,os-util --release
cargo hack test --feature-powerset
cargo hack test --feature-powerset --release

# Check all targets using all features.
check_all_targets: $(TARGETS)
$(TARGETS):
cargo hack check --target $@ --feature-powerset --skip guide,extra-docs,tcp,udp,uds,pipe,os-util
cargo hack check --target $@ --feature-powerset

# Installs all required targets for `check_all_targets`.
install_targets:
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ or higher-level libraries.

Currently supported platforms:

* Android
* Android (API level 21)
* DragonFly BSD
* FreeBSD
* Linux
Expand All @@ -139,6 +139,7 @@ Currently supported platforms:
* Windows
* iOS
* macOS
* Wine (version 6.11+, see [issue #1444])

There are potentially others. If you find that Mio works on another
platform, submit a PR to update the list!
Expand All @@ -151,6 +152,13 @@ The Windows implementation for polling sockets is using the [wepoll] strategy.
This uses the Windows AFD system to access socket readiness events.

[wepoll]: https://github.com/piscisaureus/wepoll
[issue #1444]: https://github.com/tokio-rs/mio/issues/1444

### Unsupported

* Haiku, see [issue #1472]

[issue #1472]: https://github.com/tokio-rs/mio/issues/1472

## Community

Expand Down
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
trigger: ["master", "v0.6.x"]
pr: ["master", "v0.6.x"]
trigger: ["master", "v0.6.x", "v0.7.x"]
pr: ["master", "v0.6.x", "v0.7.x"]

jobs:
# Check formatting
Expand Down Expand Up @@ -27,7 +27,7 @@ jobs:
name: nightly
displayName: Nightly
# Pin nightly to avoid being impacted by breakage
rust_version: nightly-2019-11-14
rust_version: nightly-2021-11-05
benches: true

# This represents the minimum Rust version supported by
Expand All @@ -39,7 +39,7 @@ jobs:
parameters:
name: minrust
displayName: Min Rust
rust_version: 1.39.0
rust_version: 1.46.0
cmd: check
cross: true

Expand Down
2 changes: 1 addition & 1 deletion ci/azure-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
displayName: Clippy

pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04

steps:
- template: azure-install-rust.yml
Expand Down
16 changes: 8 additions & 8 deletions ci/azure-cross-compile.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04

jobs:
- job: ${{ parameters.name }}
Expand All @@ -15,24 +15,24 @@ jobs:
target: aarch64-apple-ios

Android_ARM:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
target: arm-linux-androideabi

Android_ARM64:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
target: aarch64-linux-android

Android_32:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
target: i686-unknown-linux-gnu

NetBSD:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
target: x86_64-unknown-netbsd

Solaris:
vmImage: ubuntu-16.04
target: x86_64-sun-solaris
illumos:
vmImage: ubuntu-18.04
target: x86_64-unknown-illumos

pool:
vmImage: $(vmImage)
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-minimal-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
Linux:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
Windows:
vmImage: vs2017-win2016
pool:
Expand Down
7 changes: 5 additions & 2 deletions ci/azure-rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
- job: ${{ parameters.name }}
displayName: Check rustfmt
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04
steps:
- template: azure-install-rust.yml
parameters:
Expand All @@ -12,5 +12,8 @@ jobs:
rustup component add rustfmt
displayName: Install rustfmt
- script: |
cargo fmt --all -- --check
# FIXME: for some reason this doesn't actually check all files.
# So instead we run `rustfmt` directly on each file.
#cargo fmt --all -- --check
find src tests examples -type f -iname "*.rs" | xargs rustfmt --check
displayName: Check formatting
8 changes: 5 additions & 3 deletions ci/azure-test-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
Linux:
vmImage: ubuntu-16.04
vmImage: ubuntu-18.04

${{ if parameters.cross }}:
MacOS:
Expand All @@ -28,8 +28,10 @@ jobs:

- ${{ if eq(parameters.cmd, 'test') }}:
- script: |
cargo install cargo-hack
cargo hack check --feature-powerset --skip guide,extra-docs,tcp,udp,uds,pipe,os-util
# Cargo-hack's dependency bitflags has a higher MSVR then us.
rustup install nightly
rustup run nightly cargo install cargo-hack
cargo hack check --feature-powerset
displayName: Check feature powerset
- script: cargo ${{ parameters.cmd }} --all-features
Expand Down
8 changes: 5 additions & 3 deletions examples/tcp_server.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// You can run this example from the root of the mio repo:
// cargo run --example tcp_server --features="os-poll tcp"
// cargo run --example tcp_server --features="os-poll net"
use mio::event::Event;
use mio::net::{TcpListener, TcpStream};
use mio::{Events, Interest, Poll, Registry, Token};
Expand Down Expand Up @@ -36,7 +36,7 @@ fn main() -> io::Result<()> {

println!("You can connect to the server using `nc`:");
println!(" $ nc 127.0.0.1 9000");
println!("You'll see our welcome message and anything you type we'll be printed here.");
println!("You'll see our welcome message and anything you type will be printed here.");

loop {
poll.poll(&mut events, None)?;
Expand Down Expand Up @@ -82,7 +82,9 @@ fn main() -> io::Result<()> {
false
};
if done {
connections.remove(&token);
if let Some(mut connection) = connections.remove(&token) {
poll.registry().deregister(&mut connection)?;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/udp_server.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// You can run this example from the root of the mio repo:
// cargo run --example udp_server --features="os-poll udp"
// cargo run --example udp_server --features="os-poll net"
use log::warn;
use mio::net::UdpSocket;
use mio::{Events, Interest, Poll, Token};
Expand Down
9 changes: 9 additions & 0 deletions src/event/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ impl Event {
}

/// Returns true if the event contains readable readiness.
///
/// # Notes
///
/// Out-of-band (OOB) data also triggers readable events. But must
/// application don't actually read OOB data, this could leave an
/// application open to a Denial-of-Service (Dos) attack, see
/// <https://github.com/sandstorm-io/sandstorm-website/blob/58f93346028c0576e8147627667328eaaf4be9fa/_posts/2015-04-08-osx-security-bug.md>.
/// However because Mio uses edge-triggers it will not result in an infinite
/// loop as described in the article above.
pub fn is_readable(&self) -> bool {
sys::event::is_readable(&self.inner)
}
Expand Down
4 changes: 2 additions & 2 deletions src/event/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ use std::io;
///
/// Implementing `Source` on a struct containing a socket:
///
#[cfg_attr(all(feature = "os-poll", features = "net"), doc = "```")]
#[cfg_attr(not(all(feature = "os-poll", features = "net")), doc = "```ignore")]
#[cfg_attr(all(feature = "os-poll", feature = "net"), doc = "```")]
#[cfg_attr(not(all(feature = "os-poll", feature = "net")), doc = "```ignore")]
/// use mio::{Interest, Registry, Token};
/// use mio::event::Source;
/// use mio::net::TcpStream;
Expand Down
Loading

0 comments on commit 535717f

Please sign in to comment.