From fe99056b24034f59516b4da67cab756a05895e8e Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 25 Sep 2024 12:01:23 -0400 Subject: Re-wrap comments. --- src/id.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/id.rs') diff --git a/src/id.rs b/src/id.rs index 5ae61e9..aec7a67 100644 --- a/src/id.rs +++ b/src/id.rs @@ -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, -- cgit v1.2.3