Skip to content

Commit

Permalink
Switch crate to 2018 edition.
Browse files Browse the repository at this point in the history
This raises the MSRV to 1.32.0.
  • Loading branch information
asomers committed Nov 4, 2019
1 parent 0c4bbe6 commit 8545431
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ test_task:
name: cargo test
matrix:
- container:
image: rust:1.31.0
image: rust:1.32.0
- container:
image: rust:latest
- container:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added
- Derived `Default` for `Mutex` and `RwLock`
([#22](/~https://github.com/asomers/futures-locks/pull/22))

### Changed
- Minimum compiler version has increased to 1.32.0
([#28](/~https://github.com/asomers/futures-locks/pull/28))

## [0.4.0] - 2019-08-24
### Added
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[package]
name = "futures-locks"
edition = "2018"
version = "0.4.1-pre"
authors = ["Alan Somers <asomers@gmail.com>"]
license = "MIT/Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ standard library. But instead of blocking until ready, they return Futures
which will become ready when the lock is acquired. See the doc comments for
individual examples.

`futures-locks` requires Rust 1.31.0 or higher.
`futures-locks` requires Rust 1.32.0 or higher.

# License

Expand Down
6 changes: 0 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
//! # Examples
//!
//! ```
//! # extern crate futures;
//! # extern crate futures_locks;
//! # use futures_locks::*;
//! # use futures::executor::{Spawn, spawn};
//! # use futures::Future;
Expand All @@ -29,10 +27,6 @@
#![cfg_attr(feature = "nightly-docs", feature(doc_cfg))]

extern crate futures;
#[cfg(feature = "tokio")] extern crate tokio_current_thread;
#[cfg(feature = "tokio")] extern crate tokio_executor;

mod mutex;
mod rwlock;

Expand Down
23 changes: 8 additions & 15 deletions src/mutex.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// vim: tw=80

use futures::{Async, Future, Poll};
use futures::{Async, Future, Poll, sync::oneshot};
#[cfg(feature = "tokio")] use futures::future;
#[cfg(feature = "tokio")] use futures::future::IntoFuture;
use futures::sync::oneshot;
use std::cell::UnsafeCell;
use std::clone::Clone;
use std::collections::VecDeque;
use std::ops::{Deref, DerefMut};
use std::sync;
use std::{
cell::UnsafeCell,
clone::Clone,
collections::VecDeque,
ops::{Deref, DerefMut},
sync
};
use super::FutState;
#[cfg(feature = "tokio")] use tokio_executor::{self, Executor, SpawnError};
#[cfg(feature = "tokio")] use tokio_current_thread as current_thread;
Expand Down Expand Up @@ -193,8 +194,6 @@ unsafe impl<T: ?Sized + Send> Sync for MutexWeak<T> {}
/// # Examples
///
/// ```
/// # extern crate futures;
/// # extern crate futures_locks;
/// # use futures_locks::*;
/// # use futures::executor::{Spawn, spawn};
/// # use futures::Future;
Expand Down Expand Up @@ -265,7 +264,6 @@ impl<T: ?Sized> Mutex<T> {
/// # Examples
///
/// ```
/// # extern crate futures_locks;
/// # use futures_locks::*;
/// # fn main() {
/// let mut mtx = Mutex::<u32>::new(0);
Expand Down Expand Up @@ -298,7 +296,6 @@ impl<T: ?Sized> Mutex<T> {
///
/// # Examples
/// ```
/// # extern crate futures_locks;
/// # use futures_locks::*;
/// # fn main() {
/// let mut mtx = Mutex::<u32>::new(0);
Expand Down Expand Up @@ -353,8 +350,6 @@ impl<T: 'static + ?Sized> Mutex<T> {
/// # Examples
///
/// ```
/// # extern crate futures;
/// # extern crate futures_locks;
/// # extern crate tokio_ as tokio;
/// # use futures_locks::*;
/// # use futures::{Future, IntoFuture, lazy};
Expand Down Expand Up @@ -405,8 +400,6 @@ impl<T: 'static + ?Sized> Mutex<T> {
/// # Examples
///
/// ```
/// # extern crate futures;
/// # extern crate futures_locks;
/// # extern crate tokio_ as tokio;
/// # use futures_locks::*;
/// # use futures::{Future, IntoFuture, lazy};
Expand Down
30 changes: 8 additions & 22 deletions src/rwlock.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// vim: tw=80

use futures::{Async, Future, Poll};
use futures::{Async, Future, Poll, sync::oneshot};
#[cfg(feature = "tokio")] use futures::future;
#[cfg(feature = "tokio")] use futures::future::IntoFuture;
use futures::sync::oneshot;
use std::cell::UnsafeCell;
use std::clone::Clone;
use std::collections::VecDeque;
use std::ops::{Deref, DerefMut};
use std::sync;
use std::{
cell::UnsafeCell,
clone::Clone,
collections::VecDeque,
ops::{Deref, DerefMut},
sync,
};
use super::FutState;
#[cfg(feature = "tokio")] use tokio_executor::{self, Executor, SpawnError};
#[cfg(feature = "tokio")] use tokio_current_thread as current_thread;
Expand Down Expand Up @@ -319,7 +320,6 @@ impl<T: ?Sized> RwLock<T> {
/// # Examples
///
/// ```
/// # extern crate futures_locks;
/// # use futures_locks::*;
/// # fn main() {
/// let mut lock = RwLock::<u32>::new(0);
Expand Down Expand Up @@ -347,8 +347,6 @@ impl<T: ?Sized> RwLock<T> {
///
/// # Examples
/// ```
/// # extern crate futures;
/// # extern crate futures_locks;
/// # use futures_locks::*;
/// # use futures::executor::{Spawn, spawn};
/// # use futures::Future;
Expand All @@ -371,8 +369,6 @@ impl<T: ?Sized> RwLock<T> {
///
/// # Examples
/// ```
/// # extern crate futures;
/// # extern crate futures_locks;
/// # use futures_locks::*;
/// # use futures::executor::{Spawn, spawn};
/// # use futures::Future;
Expand All @@ -395,7 +391,6 @@ impl<T: ?Sized> RwLock<T> {
///
/// # Examples
/// ```
/// # extern crate futures_locks;
/// # use futures_locks::*;
/// # fn main() {
/// let mut lock = RwLock::<u32>::new(5);
Expand Down Expand Up @@ -423,7 +418,6 @@ impl<T: ?Sized> RwLock<T> {
///
/// # Examples
/// ```
/// # extern crate futures_locks;
/// # use futures_locks::*;
/// # fn main() {
/// let mut lock = RwLock::<u32>::new(5);
Expand Down Expand Up @@ -494,8 +488,6 @@ impl<T: 'static + ?Sized> RwLock<T> {
/// # Examples
///
/// ```
/// # extern crate futures;
/// # extern crate futures_locks;
/// # extern crate tokio_ as tokio;
/// # use futures_locks::*;
/// # use futures::{Future, IntoFuture, lazy};
Expand Down Expand Up @@ -545,8 +537,6 @@ impl<T: 'static + ?Sized> RwLock<T> {
/// # Examples
///
/// ```
/// # extern crate futures;
/// # extern crate futures_locks;
/// # extern crate tokio_ as tokio;
/// # use futures_locks::*;
/// # use futures::{Future, IntoFuture, lazy};
Expand Down Expand Up @@ -605,8 +595,6 @@ impl<T: 'static + ?Sized> RwLock<T> {
/// # Examples
///
/// ```
/// # extern crate futures;
/// # extern crate futures_locks;
/// # extern crate tokio_ as tokio;
/// # use futures_locks::*;
/// # use futures::{Future, IntoFuture, lazy};
Expand Down Expand Up @@ -658,8 +646,6 @@ impl<T: 'static + ?Sized> RwLock<T> {
/// # Examples
///
/// ```
/// # extern crate futures;
/// # extern crate futures_locks;
/// # extern crate tokio_ as tokio;
/// # use futures_locks::*;
/// # use futures::{Future, IntoFuture, lazy};
Expand Down
2 changes: 0 additions & 2 deletions tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//vim: tw=80

extern crate futures;
extern crate tokio_ as tokio;
extern crate futures_locks;

mod mutex;
mod rwlock;

0 comments on commit 8545431

Please sign in to comment.