Skip to content

Commit 4748cea

Browse files
chore(deps): bump fake from 4.4.0 to 5.1.0 (#533)
Bumps [fake](https://github.com/cksac/fake-rs) from 4.4.0 to 5.1.0. - [Release notes](https://github.com/cksac/fake-rs/releases) - [Commits](https://github.com/cksac/fake-rs/commits) --- updated-dependencies: - dependency-name: fake dependency-version: 5.1.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mateusz Maćkowski <m4tx@m4tx.pl>
1 parent 9490a28 commit 4748cea

4 files changed

Lines changed: 9 additions & 13 deletions

File tree

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ deadpool-redis = { version = "0.23", default-features = false }
9292
derive_builder = "0.20"
9393
derive_more = "2"
9494
email_address = "0.2.9"
95-
fake = "4"
95+
fake = "5"
9696
fantoccini = "0.22"
9797
form_urlencoded = "1"
9898
futures = { version = "0.3", default-features = false }

cot/src/db.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,7 +2009,7 @@ impl<const LIMIT: u32> LimitedString<LIMIT> {
20092009
#[cfg(feature = "fake")]
20102010
impl<const LIMIT: u32> fake::Dummy<usize> for LimitedString<LIMIT> {
20112011
fn dummy_with_rng<R: fake::rand::Rng + ?Sized>(len: &usize, rng: &mut R) -> Self {
2012-
use fake::rand::Rng;
2012+
use fake::rand::distr::SampleString;
20132013

20142014
assert!(
20152015
*len <= LIMIT as usize,
@@ -2020,11 +2020,7 @@ impl<const LIMIT: u32> fake::Dummy<usize> for LimitedString<LIMIT> {
20202020
)
20212021
);
20222022

2023-
let str: String = rng
2024-
.sample_iter(&fake::rand::distr::Alphanumeric)
2025-
.take(*len)
2026-
.map(char::from)
2027-
.collect();
2023+
let str: String = fake::rand::distr::Alphanumeric.sample_string(rng, *len);
20282024
Self::new(str).unwrap()
20292025
}
20302026
}

cot/tests/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use cot::db::{
88
ForeignKeyOnUpdatePolicy, Identifier, LimitedString, Model, model, query,
99
};
1010
use cot::test::TestDatabase;
11-
use fake::rand::SeedableRng;
1211
use fake::rand::rngs::StdRng;
12+
use fake::rand::{RngExt, SeedableRng};
1313
use fake::{Dummy, Fake, Faker};
1414

1515
struct WeekdaySetFaker;

0 commit comments

Comments
 (0)