diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6b08223..396141b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -15,7 +15,7 @@ jobs: name: Rustfmt [Formatter] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -116,19 +116,19 @@ jobs: # Cache files between builds - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cargo/git key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} diff --git a/CHANGELOG.md b/CHANGELOG.md index eeb59d8..6124b5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,18 @@ +0.13.0 / 2025-04-08 +=================== + + * fix: update to rand-0.9 + * Update rand requirement from 0.8 to 0.9 + * Update redis requirement from 0.27 to 0.29 + * Update redis requirement from 0.26 to 0.27 + * Update redis requirement from 0.25 to 0.26 + * Update redis requirement from 0.23 to 0.25 + * Update redis requirement from 0.22 to 0.23 + * Update redis requirement from 0.21 to 0.22 + * Fix lint casting to the same type is unnecessary + * README remove r2d2-redis + 0.12.0 / 2022-09-23 =================== diff --git a/Cargo.toml b/Cargo.toml index e2d554d..aa8b8b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sidekiq" # When updating version, also modify html_root_url in the src/lib.rs file. -version = "0.12.0" +version = "0.13.0" authors = ["Laurent Arnoud "] description = "Rust Sidekiq Client" repository = "https://github.com/spk/rust-sidekiq.git" @@ -17,8 +17,8 @@ travis-ci = { repository = "spk/rust-sidekiq" } [dependencies] futures = "0.3" -rand = "0.8" +rand = "0.9" serde = "1.0" serde_json = "1.0" -redis = { version = "0.21", features = ["connection-manager", "async-std-comp", "async-std-tls-comp"] } +redis = { version = "0.30", features = ["connection-manager", "async-std-comp", "async-std-tls-comp"] } time = "0.3" diff --git a/README.md b/README.md index e89cfb2..e12f34f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ format](https://github.com/mperham/sidekiq/wiki/Job-Format) as reference. * [rand](https://github.com/rust-random/rand) * [redis](https://github.com/mitsuhiko/redis-rs) -* [r2d2-redis](https://github.com/sorccu/r2d2-redis) * [serde_json](https://github.com/serde-rs/json) ## Installation diff --git a/src/lib.rs b/src/lib.rs index 19711a7..11ddb2d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ //! //! `REDIS_URL`="redis://127.0.0.1/" //! -#![doc(html_root_url = "https://docs.rs/sidekiq/0.12.0")] +#![doc(html_root_url = "https://docs.rs/sidekiq/0.13.0")] #![deny(warnings)] #![crate_name = "sidekiq"] diff --git a/src/sidekiq/mod.rs b/src/sidekiq/mod.rs index c2b0734..32ef064 100644 --- a/src/sidekiq/mod.rs +++ b/src/sidekiq/mod.rs @@ -4,8 +4,8 @@ use std::fmt; use std::time::{SystemTime, UNIX_EPOCH}; use crate::Value; -use rand::distributions::Alphanumeric; -use rand::{thread_rng, Rng}; +use rand::distr::Alphanumeric; +use rand::{rng, Rng}; use serde::ser::SerializeStruct; use serde::{Serialize, Serializer}; @@ -86,8 +86,8 @@ impl Default for JobOpts { let now = SystemTime::now() .duration_since(UNIX_EPOCH) .unwrap() - .as_secs() as u64; - let mut rng = thread_rng(); + .as_secs(); + let mut rng = rng(); let jid: String = (&mut rng) .sample_iter(Alphanumeric) .take(24) diff --git a/tests/lib.rs b/tests/lib.rs index 59e5b9a..8d664e1 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -38,7 +38,7 @@ fn time_ok(time: u64) -> bool { let now = SystemTime::now() .duration_since(UNIX_EPOCH) .unwrap() - .as_secs() as u64; + .as_secs(); now >= time }