Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unnecesary receiver field from GracefulShutdown #131

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

ramiroaisen
Copy link
Contributor

@ramiroaisen ramiroaisen commented Jun 18, 2024

This PR removes the unnecesary watch::Receiver<()> field from the GracefulShutdown struct.
The receiver field is unnecesary since a Receiver can be obtained with Sender::subscribe().

This reduces the size of the struct from 24 to 8.

After this is merged we can think if its worth it to enable Clone of the GracefulShutdown, which will produce a more flexible api for consumers.

Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Thanks!

@seanmonstar seanmonstar merged commit 597f92b into hyperium:master Jun 18, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants