Skip to content

Stop abstraction via the trait Notifier#263

Merged
ubnt-intrepid merged 1 commit intomainfrom
remove-notifier-trait
Dec 11, 2025
Merged

Stop abstraction via the trait Notifier#263
ubnt-intrepid merged 1 commit intomainfrom
remove-notifier-trait

Conversation

@ubnt-intrepid
Copy link
Copy Markdown
Owner

  • 冗長な抽象化なので元に戻す

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.rs module and moved all notification methods to session.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

@ubnt-intrepid ubnt-intrepid merged commit e327d9a into main Dec 11, 2025
9 checks passed
@ubnt-intrepid ubnt-intrepid deleted the remove-notifier-trait branch December 11, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants