-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this branch is front-running some other changes i'll be making. these are some small (_sometimes subjective_) nits to polish up the handler code. most importantly, this saves some redundant clones and removes needless `pub` directives from some internal interfaces. * handler: 🤝 `MessageInfo::new()` takes references this constructor does not need to take ownership of these structures. so, to reduce frivolous cloning, change the signature so that the parameters borrow the message and context. * handler: 📑 document `Handler::new() * handler: `MessageInfo` is `Debug` * handler: ❓ `should_send` takes references likewise, this can avoid a frivolous clone if we accept a reference to the context, and avoid performing the same `MessageInfo` validations twice. * handler: 🌯 remove frivolous block * handler: 🔐 internal interfaces don't need `pub` visibility these aren't used outside of this file, so we should not designate them as public interfaces.
- Loading branch information
Showing
1 changed file
with
38 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters