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

Documentation: Add StringRecord indexing example to readme/cookbook #241

Open
multimeric opened this issue Aug 15, 2021 · 1 comment · May be fixed by #242
Open

Documentation: Add StringRecord indexing example to readme/cookbook #241

multimeric opened this issue Aug 15, 2021 · 1 comment · May be fixed by #242
Labels

Comments

@multimeric
Copy link

This is just a documentation suggestion so I'm not following the usual issue format if that's okay.

As a new user of this crate as of today, I noticed that reading through the main examples in the index and also the cookbook only interact with the records by using dbg!. This has the downside in that it doesn't show how to actually use a record in a real-life situation, which I believe is indexing it using .get() or [] to get at each of the "cells" in the CSV. I find the Serde example is quite clear because it's evident that you end up with an instance of Record, which has clearly defined types, it's only the non-Serde example where I wasn't sure what I was working with.

So my suggestion is to show this normal indexing behaviour in the main examples, and also link to the StringRecord examples for more detail.

I'm happy to write up a PR for this if you agree..

@BurntSushi
Copy link
Owner

Sounds great! Thanks. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants