Skip to content

Conversation

@sandreim
Copy link
Collaborator

No description provided.

Signed-off-by: Andrei Sandu <[email protected]>
@sandreim sandreim requested review from drahnr and vstakhov December 15, 2022 13:31
pub async fn broadcast_signal(&mut self, signal: #signal_ty) -> ::std::result::Result<(), #error_ty > {
#(
let _ = self. #subsystem_name .send_signal(signal.clone()).await;
self. #subsystem_name .send_signal(signal.clone()).await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

One curious thing in Rust: _ is a non-binding association, so if the intention was to drop the result after the block it would not be hold...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey @vstakhov , I don't quite get how that is related? The only reason it exists was to make the compiler 🤫 on the unused result.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure what the intention was, I'd speculate this has gone through some refactoring and original reasoning cannot be recovered. Maybe @drahnr might know something

Copy link
Collaborator

Choose a reason for hiding this comment

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

This was part of the initial implementation, before it became a framework, before disputes existed, and when the base assumption was that the signal channels are almost always empty and "are not a problem".

@sandreim sandreim merged commit c94b553 into master Dec 15, 2022
drahnr added a commit that referenced this pull request Jan 19, 2023
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.

3 participants