diff options
author | hozan23 <hozan23@karyontech.net> | 2024-06-27 03:52:18 +0200 |
---|---|---|
committer | hozan23 <hozan23@karyontech.net> | 2024-06-27 23:32:10 +0200 |
commit | bcc6721257889f85f57af1b40351540585ffd41d (patch) | |
tree | 915adea7454fa91eafadfd9e7f9834a7cd0d9ebc /core/src/event.rs | |
parent | 7e4e25d9fbac403b0d46e8081baf00fb3865d56d (diff) |
Remove redundant type aliases
Diffstat (limited to 'core/src/event.rs')
-rw-r--r-- | core/src/event.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/src/event.rs b/core/src/event.rs index 1632df3..a4e356b 100644 --- a/core/src/event.rs +++ b/core/src/event.rs @@ -14,7 +14,6 @@ use crate::{async_runtime::lock::Mutex, util::random_32, Result}; const CHANNEL_BUFFER_SIZE: usize = 1000; -pub type ArcEventSys<T> = Arc<EventSys<T>>; pub type EventListenerID = u32; type Listeners<T> = HashMap<T, HashMap<String, HashMap<EventListenerID, Sender<Event>>>>; @@ -84,7 +83,7 @@ where T: std::hash::Hash + Eq + std::fmt::Debug + Clone, { /// Creates a new [`EventSys`] - pub fn new() -> ArcEventSys<T> { + pub fn new() -> Arc<EventSys<T>> { Arc::new(Self { listeners: Mutex::new(HashMap::new()), listener_buffer_size: CHANNEL_BUFFER_SIZE, @@ -101,7 +100,7 @@ where /// starts to consume the buffered events. /// /// If `size` is zero, this function will panic. - pub fn with_buffer_size(size: usize) -> ArcEventSys<T> { + pub fn with_buffer_size(size: usize) -> Arc<EventSys<T>> { Arc::new(Self { listeners: Mutex::new(HashMap::new()), listener_buffer_size: size, |