Skip to content

Commit

Permalink
Merge branch 'master' into tokio-0.2.0-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
berkowski committed Aug 23, 2019
2 parents 84163fd + 1e001eb commit 93e91aa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on http://keepachangelog.com/[Keep a Changelog]
and this project adheres to http://semver.org/[Semantic Versioning].


=== [X.X] UNRELEASED
* Bumped to tokio dependencies to version 0.2
Majority of work done by @12101111 and @will-w in PR's [#19](https://github.com/berkowski/tokio-serial/pull/19)
and [#21](https://github.com/berkowski/tokio-serial/pull/21) respectively

=== [3.3.0] 2019-08-23
* Bumped [mio-serial](https://gitlab.com/berkowski/mio-serial) to 3.3.0
* Switched to "2018" edition

=== [3.2.14] 2019-06-01
==== Changed
* Bumped [mio-serial](https://gitlab.com/berkowski/mio-serial) to 3.2.14 (tracking mio version 0.14)
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tokio-serial"
version = "3.2.14-tokio-0.2.0-alpha.1"
version = "3.3.0-tokio-0.2.0-alpha.1"
authors = ["Zac Berkowitz <zac.berkowitz@gmail.com>"]
description = "A serial port implementation for tokio"
license = "MIT"
Expand All @@ -25,7 +25,7 @@ tokio-io = "0.2.0-alpha.1"
tokio-reactor = "0.2.0-alpha.1"
bytes = "0.4"
mio = "0.6"
mio-serial = { version = "=3.2.14", default-features = false }
mio-serial = { version = "=3.3.0", default-features = false }

[dev-dependencies]
futures-preview = "=0.3.0-alpha.17"
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ Add `tokio-serial` to you `Cargo.toml`:

```toml
[dependencies]
tokio-serial = "3.2"
```

Then add this to your crate root:

```rust
extern crate tokio_serial;
tokio-serial = "3.3"
```

## Resources
Expand Down
9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//! bindings in `mio_serial`
//!
#![deny(missing_docs)]
#![warn(rust_2018_idioms)]

// Re-export serialport types and traits from mio_serial
pub use mio_serial::{
Expand Down Expand Up @@ -255,23 +256,23 @@ impl AsRawFd for Serial {
impl AsyncRead for Serial {
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context,
cx: &mut Context <'_>,
buf: &mut [u8],
) -> Poll<io::Result<usize>> {
Pin::new(&mut self.get_mut().io).poll_read(cx, buf)
}
}

impl AsyncWrite for Serial {
fn poll_write(self: Pin<&mut Self>, cx: &mut Context, buf: &[u8]) -> Poll<io::Result<usize>> {
fn poll_write(self: Pin<&mut Self>, cx: &mut Context <'_>, buf: &[u8]) -> Poll<io::Result<usize>> {
Pin::new(&mut self.get_mut().io).poll_write(cx, buf)
}

fn poll_flush(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context <'_>) -> Poll<io::Result<()>> {
Pin::new(&mut self.get_mut().io).poll_flush(cx)
}

fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context <'_>) -> Poll<io::Result<()>> {
Pin::new(&mut self.get_mut().io).poll_shutdown(cx)
}
}

0 comments on commit 93e91aa

Please sign in to comment.