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

Small change to avoid the implicit cast on foreach #361

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MikeShah
Copy link

@MikeShah MikeShah commented Apr 6, 2023

No description provided.

multithreading/message-passing.md Show resolved Hide resolved
@@ -124,11 +123,10 @@ void main()

// Odd threads get a number, even threads
// a string!
foreach(idx, ref tid; threads) {
import std.string : format;
foreach(size_t idx, ref tid; threads) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure specifying the type here is needed if we use size_t for NumberMessage.

Copy link
Author

Choose a reason for hiding this comment

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

Was being explicit, but agreed the type is not needed.

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.

None yet

2 participants