Skip to content

Commit

Permalink
bump basu version & thiserror version & fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
leonzchang committed Feb 15, 2025
1 parent 4aec43b commit ac4174f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 14 deletions.
16 changes: 16 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# If there are words that you think should not be treated as typo.
# Please list here along with a comment.
[default.extend-words]
# Preserved for NdJson
"Nd" = "Nd"
# Microsoft K8s Server
"AKS" = "AKS"
# Wrong cases
"ba" = "ba"
"ue" = "ue"
"INOUT" = "INOUT"
"ser" = "ser"
"Ser" = "Ser"

[files]
extend-exclude = ["scripts/benchmark/", "benchmark/", "tests/"]
23 changes: 15 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[workspace]
members = [
"basu"
]
members = ["basu"]

[workspace.package]
authors = ["Leonz Chang<bellerophon00530@gmail.com>"]
version = "0.1.5"
version = "0.1.6"
edition = "2021"
repository = "https://github.com/leonzchang/basu.git"
documentation = "https://docs.rs/basu"
Expand All @@ -17,8 +15,17 @@ license = "MIT"
[workspace.dependencies]
anyhow = "1"
async-trait = "0.1"
futures = "0.3"
futures = "0.3"
rayon = "1.7"
tokio = { version = "1", default-features = false, features = ["rt", "sync", "macros"] }
thiserror = "1"
uuid = { version = "1", features = ["serde", "v4", "fast-rng", "macro-diagnostics"] }
tokio = { version = "1", default-features = false, features = [
"rt",
"sync",
"macros",
] }
thiserror = "2.0.11"
uuid = { version = "1", features = [
"serde",
"v4",
"fast-rng",
"macro-diagnostics",
] }
12 changes: 6 additions & 6 deletions basu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
//! ### Features:
//!
//! - Support for both asynchronous and synchronous event handling. Choose the approach
//! that best fits your application's needs.
//! that best fits your application's needs.
//!
//! - Provides an abstraction for representing events, allowing you to define custom
//! event structures with payload data.
//! event structures with payload data.
//!
//! - Well-defined error types and error handling mechanisms for reliable event bus
//! operations.
//! operations.
//!
//! To enable the synchronous event handling capability, use the `sync` feature:
//!
Expand Down Expand Up @@ -61,11 +61,11 @@ use std::{collections::HashMap, sync::Arc};

use uuid::Uuid;

/// Hanlder
/// Handler
pub type Handler<T> = Box<dyn Handle<T>>;
/// Hanlder map with Id
/// Handler map with Id
pub type HandlerMap<T> = Arc<Mutex<HashMap<HandlerId, Handler<T>>>>;
/// Event Hanlder map
/// Event Handler map
pub type EventHandlerMap<T> = Arc<Mutex<HashMap<String, HandlerMap<T>>>>;

/// An asynchronous `EventBus` to interact with.
Expand Down

0 comments on commit ac4174f

Please sign in to comment.