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 green yellow tests #136

Merged
merged 3 commits into from
Oct 8, 2024
Merged

Fix green yellow tests #136

merged 3 commits into from
Oct 8, 2024

Conversation

jonathanpallant
Copy link
Member

Ooops - found a case our solution didn't handle.

Also re-wrote the solution to hopefully be easier to read.

And, std::random is coming!

Copy link

Deploying ferrous-systems-rust-exercises with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7024413
Status: ✅  Deploy successful!
Preview URL: https://87701397.ferrous-systems-rust-exercises.pages.dev
Branch Preview URL: https://fix-green-yellow-tests.ferrous-systems-rust-exercises.pages.dev

View logs

// never match this secret digit again
secret_handled[s_idx] = true;
// stop comparing this guessed digit to any other secret digits
continue 'guess;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would normally not advocate for the use of labelled gotos in any teaching material, but this seems simple and self-contained enough that it dovetails nicely with the example.

@miguelraz miguelraz merged commit 8f2999f into main Oct 8, 2024
3 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
Development

Successfully merging this pull request may close these issues.

2 participants