Stop abstraction via the trait Notifier#263
Merged
ubnt-intrepid merged 1 commit intomainfrom Dec 11, 2025
Merged
Conversation
Owner
ubnt-intrepid
commented
Dec 11, 2025
- 冗長な抽象化なので元に戻す
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the Notifier trait abstraction and consolidates the notification functionality directly into the Notifier<'sess, T> struct implementation. The PR description indicates this was done to eliminate redundant abstraction ("冗長な抽象化なので元に戻す" - "Reverting redundant abstraction").
Key changes:
- Deleted the
notify.rsmodule and moved all notification methods tosession.rs - Converted trait methods to inherent methods on the
Notifier<'sess, T>struct - Removed trait imports from example files (no longer needed with inherent methods)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/notify.rs | Complete removal of the Notifier trait and its default implementations |
| src/session.rs | Added all notification methods as public inherent methods on Notifier<'sess, T>; inlined new_notify_unique logic into retrieve method |
| src/lib.rs | Removed the notify module from public exports |
| examples/poll.rs | Removed notify::Notifier as _ trait import |
| examples/heartbeat_entry.rs | Removed notify::Notifier as _ trait import |
| examples/heartbeat.rs | Removed notify::Notifier as _ trait import |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.