chore: replace uuid with nanoid

This commit is contained in:
appflowy
2022-04-11 15:27:03 +08:00
parent f438898831
commit 82840e1201
33 changed files with 133 additions and 120 deletions

View File

@ -14,7 +14,7 @@ futures = "0.3.15"
futures-util = "0.3.15"
bytes = {version = "1.0", features = ["serde"]}
tokio = { version = "1", features = ["full"] }
uuid = { version = "0.8", features = ["serde", "v4"] }
nanoid = "0.4.0"
log = "0.4.14"
env_logger = "0.8"
serde_with = "1.9.4"

View File

@ -22,6 +22,7 @@ use crate::{
},
};
use futures_core::future::BoxFuture;
use nanoid::nanoid;
use std::sync::Arc;
pub type ModuleMap = Arc<HashMap<Event, Arc<Module>>>;
@ -118,7 +119,7 @@ impl ModuleRequest {
E: Into<Event>,
{
Self {
id: uuid::Uuid::new_v4().to_string(),
id: nanoid!(6),
event: event.into(),
payload: Payload::None,
}