Skip to content

Commit

Permalink
Merge pull request #98 from moka-rs/prepare-0.8.0
Browse files Browse the repository at this point in the history
Prepare for v0.8.0 release
  • Loading branch information
tatsuya6502 authored Mar 19, 2022
2 parents b1921fb + 9d39162 commit de06735
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 83 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Moka — Change Log

## Version 0.8.0


## Version 0.7.2

The minimum supported Rust version (MSRV) is now 1.51.0 (2021-03-25).
Expand Down
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "moka"
version = "0.7.2"
version = "0.8.0"
edition = "2018"
rust-version = "1.51"

Expand Down Expand Up @@ -53,8 +53,7 @@ async-lock = { version = "2.4", optional = true }
futures-util = { version = "0.3", optional = true }

[dev-dependencies]
actix-rt2 = { package = "actix-rt", version = "2", default-features = false }
actix-rt1 = { package = "actix-rt", version = "1", default-features = false }
actix-rt = { version = "2", default-features = false }
async-std = { version = "1", default-features = false, features = ["attributes"] }
getrandom = "0.2"
reqwest = "0.11"
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
moka = "0.7"
moka = "0.8"
```

To use the asynchronous cache, enable a crate feature called "future".

```toml
[dependencies]
moka = { version = "0.7", features = ["future"] }
moka = { version = "0.8", features = ["future"] }
```


Expand Down Expand Up @@ -193,7 +193,7 @@ Here is a similar program to the previous example, but using asynchronous cache
// Cargo.toml
//
// [dependencies]
// moka = { version = "0.7", features = ["future"] }
// moka = { version = "0.8", features = ["future"] }
// tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }
// futures-util = "0.3"
Expand Down Expand Up @@ -435,9 +435,9 @@ to the dependency declaration.

```toml:Cargo.toml
[dependencies]
moka = { version = "0.7", default-feautures = false }
moka = { version = "0.8", default-feautures = false }
# Or
moka = { version = "0.7", default-feautures = false, features = ["future"] }
moka = { version = "0.8", default-feautures = false, features = ["future"] }
```

This will make Moka to switch to a fall-back implementation, so it will compile.
Expand Down
2 changes: 1 addition & 1 deletion src/future/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::{
/// // Cargo.toml
/// //
/// // [dependencies]
/// // moka = { version = "0.7", features = ["future"] }
/// // moka = { version = "0.8", features = ["future"] }
/// // tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }
/// // futures = "0.3"
///
Expand Down
10 changes: 5 additions & 5 deletions src/future/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ use std::{
/// // Cargo.toml
/// //
/// // [dependencies]
/// // moka = { version = "0.7", features = ["future"] }
/// // moka = { version = "0.8", features = ["future"] }
/// // tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }
/// // futures-util = "0.3"
///
Expand Down Expand Up @@ -144,7 +144,7 @@ use std::{
/// // Cargo.toml
/// //
/// // [dependencies]
/// // moka = { version = "0.7", features = ["future"] }
/// // moka = { version = "0.8", features = ["future"] }
/// // tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }
/// // futures-util = "0.3"
///
Expand Down Expand Up @@ -206,7 +206,7 @@ use std::{
/// // Cargo.toml
/// //
/// // [dependencies]
/// // moka = { version = "0.7", features = ["future"] }
/// // moka = { version = "0.8", features = ["future"] }
/// // tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }
/// // futures-util = "0.3"
///
Expand Down Expand Up @@ -394,7 +394,7 @@ where
/// // Cargo.toml
/// //
/// // [dependencies]
/// // moka = { version = "0.7", features = ["future"] }
/// // moka = { version = "0.8", features = ["future"] }
/// // futures-util = "0.3"
/// // tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }
/// use moka::future::Cache;
Expand Down Expand Up @@ -485,7 +485,7 @@ where
/// // Cargo.toml
/// //
/// // [dependencies]
/// // moka = { version = "0.7", features = ["future"] }
/// // moka = { version = "0.8", features = ["future"] }
/// // futures-util = "0.3"
/// // reqwest = "0.11"
/// // tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }
Expand Down
68 changes: 0 additions & 68 deletions tests/runtime_actix_rt1.rs

This file was deleted.

2 changes: 1 addition & 1 deletion tests/runtime_actix_rt2.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg(features = "future")]

use actix_rt2::{Arbiter, System};
use actix_rt::{Arbiter, System};
use moka::future::Cache;

fn main() {
Expand Down

0 comments on commit de06735

Please sign in to comment.