diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-09-25 12:01:23 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-09-25 12:01:23 -0400 |
| commit | fe99056b24034f59516b4da67cab756a05895e8e (patch) | |
| tree | 5aebeaaecec63232c88e478fd92450cf57fd1ca5 /src/id.rs | |
| parent | 674a50f84b6fd94fa7d677261a0c8c95ad7f7526 (diff) | |
Re-wrap comments.
Diffstat (limited to 'src/id.rs')
| -rw-r--r-- | src/id.rs | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -7,7 +7,8 @@ use std::fmt; // * Do not require escaping in hostnames // * Are unique up to case conversion // * Are relatively unlikely to contain cursewords -// * Are relatively unlikely to contain visually similar characters in most typefaces +// * Are relatively unlikely to contain visually similar characters in most +// typefaces // * Are not sequential // // This leaves 23 ASCII characters, or about 4.52 bits of entropy per character @@ -17,16 +18,17 @@ const ALPHABET: [char; 23] = [ 't', 'w', 'x', 'y', ]; -// Pick enough characters per ID to make accidental collisions "acceptably" unlikely -// without also making them _too_ unwieldy. This gives a fraction under 68 bits per ID. +// Pick enough characters per ID to make accidental collisions "acceptably" +// unlikely without also making them _too_ unwieldy. This gives a fraction under +// 68 bits per ID. const ID_SIZE: usize = 15; // Intended to be wrapped in a newtype that provides both type-based separation // from other identifier types, and a unique prefix to allow the intended type // of an ID to be determined by eyeball when debugging. // -// By convention, the prefix should be UPPERCASE - note that the alphabet for this -// is entirely lowercase. +// By convention, the prefix should be UPPERCASE - note that the alphabet for +// this is entirely lowercase. #[derive( Clone, Debug, |
