Skip to content

Conversation

@Kitt3120
Copy link
Contributor

@Kitt3120 Kitt3120 commented Oct 26, 2024

  • Remove Subscription
  • Remove ReceiverSubscription
  • Fix wrong subscriber name used in Bot::join()
  • Adapt code to use UUIDs instead of Subscriptions
  • Refactoring of ArcObservable's get()
  • Add missing AsRef<Event<…>> for ArcObservable

AI Summary

This pull request includes several changes to the event handling system and some minor improvements in the bot's task management. The most important changes involve the removal of the Subscription and ReceiverSubscription structs, modifications to the Event struct, and updates to the ArcObservable and EventRepeater implementations.

Event Handling System:

  • src/event.rs: Removed the subscription module and its usage across the codebase.
  • src/event/event.rs: Updated the subscribe_channel, subscribe_async_closure, and subscribe_closure methods to return Uuid instead of Subscription. Modified unsubscribe method to use Uuid directly. [1] [2] [3] [4] [5] [6]
  • src/event/subscription.rs: Removed the Subscription and ReceiverSubscription structs entirely.

ArcObservable Improvements:

EventRepeater Updates:

Bot Task Management:

  • src/bot.rs: Added task ID handling and improved the subscription mechanism for status change events. [1] [2]

@Kitt3120 Kitt3120 added the refactor Optimizes or restructures code label Oct 26, 2024
@Kitt3120 Kitt3120 requested a review from Murasko October 26, 2024 12:42
@Kitt3120 Kitt3120 self-assigned this Oct 26, 2024
@Kitt3120 Kitt3120 linked an issue Oct 26, 2024 that may be closed by this pull request
- Remove Subscription
- Remove ReceiverSubscription
- Fix wrong event name used in Bot::join()
- Adapt code to use UUIDs instead of Subscriptions
@Kitt3120 Kitt3120 enabled auto-merge (squash) October 26, 2024 12:49
Copy link
Collaborator

@Murasko Murasko left a comment

Choose a reason for hiding this comment

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

idot check done, lgtm

@Kitt3120 Kitt3120 merged commit 555e803 into main Oct 26, 2024
3 checks passed
@Kitt3120 Kitt3120 deleted the refactor/events branch October 26, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Optimizes or restructures code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Rework Events, Subscribers, Subscriptions

3 participants