Skip to content
This repository was archived by the owner on Feb 8, 2025. It is now read-only.

Commit d4531e6

Browse files
committed
Deprecate in favour of rand_distr::Zipf
It uses the same implementation, and is maintained by a larger group of people who also keep up with `rand`. Closes #12.
1 parent 3dd2e52 commit d4531e6

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
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
@@ -1,6 +1,6 @@
11
[package]
22
name = "zipf"
3-
version = "7.0.1"
3+
version = "7.0.2"
44
readme = "./README.md"
55
description = "A fast generator of discrete, bounded Zipf-distributed random numbers"
66
authors = ["Jon Gjengset <[email protected]>"]

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
> [!CAUTION]
2+
> This crate is deprecated. Prefer
3+
> [`rand_distr::Zipf`](https://docs.rs/rand_distr/latest/rand_distr/struct.Zipf.html).
4+
5+
---
6+
17
# rust-zipf
28

39
[![Crates.io](https://img.shields.io/crates/v/zipf.svg)](https://crates.io/crates/zipf)

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ use rand::Rng;
3636
/// Random number generator that generates Zipf-distributed random numbers using rejection
3737
/// inversion.
3838
#[derive(Clone, Copy)]
39+
#[deprecated = "prefer rand_distr::Zipf"]
3940
pub struct ZipfDistribution {
4041
/// Number of elements
4142
num_elements: f64,

0 commit comments

Comments
 (0)