From 9a745bb56d592f9b02f94c1d681fe607670fae02 Mon Sep 17 00:00:00 2001 From: stale Date: Thu, 30 Jun 2022 07:18:45 -0300 Subject: clippy fixes and version bump --- src/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/types.rs') diff --git a/src/types.rs b/src/types.rs index cb16042..f9f166a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -85,11 +85,11 @@ impl std::borrow::Borrow for RoomId { impl RoomId { pub fn new_in(map: &HashMap) -> Self { use rand::{ thread_rng, Rng, distributions::Alphanumeric }; - let id = RoomId { 0: thread_rng() + let id = RoomId(thread_rng() .sample_iter(&Alphanumeric) .take(16) .map(char::from) - .collect::() }; + .collect::()); if map.contains_key(&id) { RoomId::new_in(map) } else { id } } -- cgit v1.2.3