diff --git a/examples/pastebin/src/paste_id.rs b/examples/pastebin/src/paste_id.rs index 2586b302..83b7cf0a 100644 --- a/examples/pastebin/src/paste_id.rs +++ b/examples/pastebin/src/paste_id.rs @@ -14,8 +14,8 @@ pub struct PasteID<'a>(Cow<'a, str>); impl<'a> PasteID<'a> { /// Generate a _probably_ unique ID with `size` characters. For readability, /// the characters used are from the sets [0-9], [A-Z], [a-z]. The - /// probability of a collision depends on the value of `size`. In - /// particular, the probability of a collision is 1/62^(size). + /// probability of a collision depends on the value of `size` and the number + /// of IDs generated thus far. pub fn new(size: usize) -> PasteID<'static> { let mut id = String::with_capacity(size); let mut rng = rand::thread_rng(); diff --git a/site/guide/pastebin.md b/site/guide/pastebin.md index 07b71283..1c29de52 100644 --- a/site/guide/pastebin.md +++ b/site/guide/pastebin.md @@ -145,8 +145,8 @@ pub struct PasteID<'a>(Cow<'a, str>); impl<'a> PasteID<'a> { /// Generate a _probably_ unique ID with `size` characters. For readability, /// the characters used are from the sets [0-9], [A-Z], [a-z]. The - /// probability of a collision depends on the value of `size`. In - /// particular, the probability of a collision is 1/62^(size). + /// probability of a collision depends on the value of `size` and the number + /// of IDs generated thus far. pub fn new(size: usize) -> PasteID<'static> { let mut id = String::with_capacity(size); let mut rng = rand::thread_rng();