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

Issue a diagnostic whenever Publication is not used #582

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

fuzzypixelz
Copy link
Member

Resolves #581.

I opted to put #[must_use] on Publication itself instead of Publisher::put. This way we cover Publisher::delete and Publisher::write too, and any method that returns Publication.

Copy link
Contributor

@p-avital p-avital left a comment

Choose a reason for hiding this comment

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

Could you apply this to all types that impl SyncResolve, you should be able to find them all using Rust Analyzer's reference search.

zenoh/src/publication.rs Outdated Show resolved Hide resolved
@fuzzypixelz fuzzypixelz requested a review from p-avital November 7, 2023 14:24
@p-avital p-avital merged commit 9ea5dc1 into eclipse-zenoh:master Nov 7, 2023
@fuzzypixelz fuzzypixelz deleted the must-use-publication branch December 14, 2023 16:58
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.

must_use for put
2 participants