diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-09-04 12:13:54 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-09-04 12:13:54 -0400 |
| commit | cae21da31ff795cc21ec19288fcdc5fdb8a713c7 (patch) | |
| tree | c3ae1f5fdfc6ebd703a9387b1108671c003b7eaa /src/id.rs | |
| parent | 2c999920d8f6f0b320960b01721e1f29f4078755 (diff) | |
Allow any login to create channels.
Diffstat (limited to 'src/id.rs')
| -rw-r--r-- | src/id.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1,4 +1,5 @@ use rand::{seq::SliceRandom, thread_rng}; +use std::fmt; // Make IDs that: // @@ -30,6 +31,12 @@ pub const ID_SIZE: usize = 15; #[sqlx(transparent)] pub struct Id(String); +impl fmt::Display for Id { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.0.fmt(f) + } +} + impl Id { pub fn generate<T>(prefix: &str) -> T where |
