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

Added false to write_str #610

Closed
wants to merge 1 commit into from
Closed

Added false to write_str #610

wants to merge 1 commit into from

Conversation

xj42
Copy link

@xj42 xj42 commented May 22, 2019

WIthout the ability to set equals to false, the function doesn't correctly handle failing comparisions.

WIthout the ability to set equals to false, the function doesn't correctly handle failing comparisions.
@phil-opp
Copy link
Owner

Thanks for the pull request! It definitely improves the situation, but it is still a hacky solution that still has its problems. For example, panic!("x{}", MESSAGE) still succeeds.

For this reason I decided to rewrite this function completely using a different approach that checks the whole string and not just individual string components. I will open a PR shortly.

Thanks again for reporting this issue!

@phil-opp
Copy link
Owner

I opened #611 with the new version of the CompareMessage struct.

@xj42
Copy link
Author

xj42 commented May 22, 2019

Glad to have been some small help.

I tried your solution and it works a treat.

Writing a kernel is not the best way to learn rust, but it sure is fun.
Thanks for the tutorials!

@xj42 xj42 closed this May 22, 2019
@phil-opp
Copy link
Owner

@xj42 Thanks for testing!

Writing a kernel is not the best way to learn rust, but it sure is fun.
Thanks for the tutorials!

You're welcome :). Let me know if you have any questions, I try to make the tutorials accessible to Rust newcomers too.

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