Add the ability to jump between channels while in a channel

This commit is contained in:
Mikayla Maki 2023-08-02 17:13:09 -07:00
parent 0ae1f29be8
commit 30e1bfc872
No known key found for this signature in database
5 changed files with 110 additions and 3 deletions

View file

@ -540,6 +540,7 @@ impl Client {
}
}
#[track_caller]
pub fn add_message_handler<M, E, H, F>(
self: &Arc<Self>,
model: ModelHandle<E>,
@ -575,8 +576,11 @@ impl Client {
}),
);
if prev_handler.is_some() {
let location = std::panic::Location::caller();
panic!(
"registered handler for the same message {} twice",
"{}:{} registered handler for the same message {} twice",
location.file(),
location.line(),
std::any::type_name::<M>()
);
}