Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use v1 in README #1740

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ information.
at least `event::Source` and `Poll`.
* Mio now uses Rust 2018 and rustfmt for all code.
* `Event` was changed to be a wrapper around the OS event. This means it can be
significantly larger on some OSes.
significantly larger on some OSs.
* `Ready` was removed and replaced with various `is_*` methods on `Event`. For
example instead checking for readable readiness using
`Event::ready().is_readable()`, you would call `Event::is_readable()`.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ overhead as possible over the OS abstractions.

**API documentation**

* [v1](https://docs.rs/mio/^1)
* [v0.8](https://docs.rs/mio/^0.8)
* [v0.7](https://docs.rs/mio/^0.7)

This is a low level library, if you are looking for something easier to get
started with, see [Tokio](https://tokio.rs).
Expand All @@ -32,7 +32,7 @@ To use `mio`, first add this to your `Cargo.toml`:

```toml
[dependencies]
mio = "0.8"
mio = "1"
```

Next we can start using Mio. The following is quick introduction using
Expand Down Expand Up @@ -110,7 +110,7 @@ fn main() -> Result<(), Box<dyn Error>> {

## Features

* Non-blocking TCP, UDP
* Non-blocking TCP, UDP, UDS
* I/O event queue backed by epoll, kqueue, and IOCP
* Zero allocations at runtime
* Platform specific extensions
Expand Down
27 changes: 0 additions & 27 deletions src/io_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,6 @@ use crate::{event, Interest, Registry, Token};
///
/// [`Poll`]: crate::Poll
/// [`do_io`]: IoSource::do_io
/*
///
/// # Examples
///
/// Basic usage.
///
/// ```
/// # use std::error::Error;
/// # fn main() -> Result<(), Box<dyn Error>> {
/// use mio::{Interest, Poll, Token};
/// use mio::IoSource;
///
/// use std::net;
///
/// let poll = Poll::new()?;
///
/// // Bind a std TCP listener.
/// let listener = net::TcpListener::bind("127.0.0.1:0")?;
/// // Wrap it in the `IoSource` type.
/// let mut listener = IoSource::new(listener);
///
/// // Register the listener.
/// poll.registry().register(&mut listener, Token(0), Interest::READABLE)?;
/// # Ok(())
/// # }
/// ```
*/
pub struct IoSource<T> {
state: IoSourceState,
inner: T,
Expand Down
2 changes: 1 addition & 1 deletion src/sys/unix/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub(crate) fn accept(listener: &net::TcpListener) -> io::Result<(net::TcpStream,
}?;

// But not all platforms have the `accept4(2)` call. Luckily BSD (derived)
// OSes inherit the non-blocking flag from the listener, so we just have to
// OSs inherit the non-blocking flag from the listener, so we just have to
// set `CLOEXEC`.
#[cfg(any(
target_os = "aix",
Expand Down
2 changes: 1 addition & 1 deletion tests/aio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl Aiocb {
/// The resulting `Aiocb` structure is suitable for use with `aio_fsync`
pub fn from_fd(fd: RawFd) -> Aiocb {
// Use mem::zeroed instead of explicitly zeroing each field, because the
// number and name of reserved fields is OS-dependent. On some OSes,
// number and name of reserved fields is OS-dependent. On some OSs,
// some reserved fields are used the kernel for state, and must be
// explicitly zeroed when allocated.
let mut inner = unsafe { mem::zeroed::<libc::aiocb>() };
Expand Down