-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Ex31 1 tempfile #1288
Ex31 1 tempfile #1288
Conversation
For readability.
Exercise 31.1 needs use tempfile::tempfile; to work, and also for `tempfile = "3"` to be added to Cargo.toml.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Thanks! However, as explained in #1286 (comment), this should not be necessary. I triggered the test run, but as expected it fails:
|
I'm sure you're right, but I don't understand. If I do |
That is correct! My thinking was that people would copy the code from the exercise page and then expand that to solve the exercise. The unit tests found in the solution are actually there for my own safety: they allow me to ensure that the solution works. I see now that this is rather confusing! We've never explained anywhere that the solutions have dependencies outside of the standard library.
Yeah, that's also a good point! Originally, I wrote the entire course centered around the Rust Playground — mostly because I was unsure about how complicated it would be to have 20 course participants install and set up Rust on Linux and Mac laptops... I wanted to avoid having to deal with random problems of that setup. However, it is of course an unnatural way to write larger amounts of Rust code, so I later added the recommendation to install Rust locally. It seems to work okay in the classes we teach as well: people normally set this up ahead of time. So in short, we should update the boiler plate text for how the exercises are done. I created #1289 for this. |
#1290 is about expanding the solutions to mention their dependencies. |
Thanks for the PR. I'll close this now since the real problem is a matter of documentation. |
Add missing
use
in model solutionFixes #1287.