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

Draft: port durable file, add incremental tests #42

Closed
wants to merge 1 commit into from

Conversation

miguelraz
Copy link
Contributor

No description provided.

@miguelraz miguelraz changed the title port durable file, add incremental tests Draft: port durable file, add incremental tests Oct 4, 2023
@jonathanpallant
Copy link
Member

I was never keen on this exercise because files flush themselves on drop anyway, so panicking on drop because some method wasn't previously called never seemed very helpful.

What topics have you found it useful for covering?

@miguelraz
Copy link
Contributor Author

We just had a very positive feedback from the Open Intro to Rust group where

  • we had implemented some of our own traits in the Shapes exercise
  • they were keen on taking their time and asking a lot of questions
  • the experience of implementing a stdlib trait was qualitatively different than implementing your own invented trait

Our trainees usually appreciate the multiple places where rust-analyzer suggests a missing import be included or populates missing impl methods, and where we show how to navigate the documentation of a trait via std.rs/$TRAIT in a web browser.


I will agree though, the same above benefits could be achieved by implementing another std trait - not a huge fan of the DurableFile implementation either, and I also agree that it's not the best place to just give up and pepper panic!'s in there.

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