diff --git a/Cargo.lock b/Cargo.lock index c85a23a..6d7a3a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1373,9 +1373,9 @@ dependencies = [ "dioxus-web", "getrandom", "gloo-storage", + "rand", "serde", "thiserror 2.0.4", - "uuid", ] [[package]] @@ -1852,16 +1852,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" -[[package]] -name = "uuid" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" -dependencies = [ - "getrandom", - "serde", -] - [[package]] name = "version_check" version = "0.9.5" diff --git a/Cargo.toml b/Cargo.toml index 0dee4e4..980efce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,9 +19,9 @@ dioxus-logger = "0.6.0" dioxus-web = "0.6.0" getrandom = { version = "0.2.15", features = ["js"] } gloo-storage = "0.3.0" +rand = "0.8.5" serde = { version = "1.0.215", features = ["derive"] } thiserror = "2.0.4" -uuid = { version = "1.10.0", features = ["v4", "serde"] } [profile] diff --git a/src/domain/team_id.rs b/src/domain/team_id.rs index 6870cf8..419a7a3 100644 --- a/src/domain/team_id.rs +++ b/src/domain/team_id.rs @@ -1,12 +1,13 @@ use derive_more::*; +use rand::Rng; use serde::{Deserialize, Serialize}; -use uuid::Uuid; #[derive(Clone, Copy, Debug, Display, PartialEq, Eq, Hash, Serialize, Deserialize)] -pub struct TeamId(Uuid); +pub struct TeamId(i64); impl TeamId { pub fn new() -> Self { - TeamId(Uuid::new_v4()) + let mut rng = rand::thread_rng(); + TeamId(rng.gen::()) } }