Skip to content

Commit

Permalink
build(deps): bump rand from 0.8.5 to 0.9.0 (#142)
Browse files Browse the repository at this point in the history
* build(deps): bump rand from 0.8.5 to 0.9.0

Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.9.0.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.9.0)

---
updated-dependencies:
- dependency-name: rand
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: remove unused deps

* chore: address clippy lints

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Ede <[email protected]>
  • Loading branch information
dependabot[bot] and robjtede authored Feb 11, 2025
1 parent cbded01 commit a83726d
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 43 deletions.
122 changes: 96 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions actix-hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ actix-web = { version = "4", default-features = false }
actix-web-lab = "0.23"
futures-core = "0.3.17"
futures-util = { version = "0.3.31", default-features = false, features = ["std"] }
local-channel = "0.1"
pin-project-lite = "0.2"
tokio = { version = "1.43.0", features = ["sync", "macros"] }
tracing = { version = "0.1.41", features = ["log"] }

blake2 = { package = "blake2", version = "0.10", optional = true }
Expand All @@ -64,7 +62,6 @@ subtle = "2"

[dev-dependencies]
actix-web = "4"
base64 = "0.22"
env_logger = "0.11"
hex-literal = "0.4"
sha2 = "0.10"
Expand Down
1 change: 0 additions & 1 deletion actix-web-lab-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ rust-version.workspace = true
proc-macro = true

[dependencies]
proc-macro2 = "1"
quote = "1"
syn = { version = "2", features = ["full", "parsing"] }

Expand Down
3 changes: 1 addition & 2 deletions actix-web-lab/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ http = "0.2.7"
impl-more = "0.1.9"
itertools = "0.14"
local-channel = "0.1"
mediatype = "0.19"
mime = "0.3"
pin-project-lite = "0.2.16"
regex = "1.11.0"
Expand Down Expand Up @@ -101,7 +100,7 @@ generic-array = "0.14"
hex = "0.4"
hex-literal = "0.4"
hmac = { version = "0.12", features = ["reset"] }
rand = "0.8"
rand = "0.9"
rustls = "0.23"
rustls-pemfile = "2"
serde = { version = "1", features = ["derive"] }
Expand Down
17 changes: 6 additions & 11 deletions actix-web-lab/examples/ndjson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ use actix_web::{
use actix_web_lab::respond::NdJson;
use futures_core::Stream;
use futures_util::{stream, StreamExt as _};
use rand::{distributions::Alphanumeric, Rng as _};
use rand::{
distr::{Alphanumeric, SampleString as _},
Rng as _,
};
use serde::Deserialize;
use serde_json::json;
use tracing::info;
Expand Down Expand Up @@ -98,19 +101,11 @@ async fn main() -> io::Result<()> {
}

fn random_email() -> String {
let rng = rand::thread_rng();

let id: String = rng
.sample_iter(Alphanumeric)
.take(10)
.map(char::from)
.collect();

let id = Alphanumeric.sample_string(&mut rand::rng(), 10);
format!("user_{id}@example.com")
}

fn random_address() -> String {
let mut rng = rand::thread_rng();
let street_no: u16 = rng.gen_range(10..99);
let street_no: u16 = rand::rng().random_range(10..=99);
format!("{street_no} Random Street")
}

0 comments on commit a83726d

Please sign in to comment.