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

Read csv records with different delimeter #235

Closed
wants to merge 1 commit into from

Conversation

alisha17
Copy link
Contributor

@alisha17 alisha17 commented Jul 10, 2017

fixes #229

@alisha17 alisha17 force-pushed the csv_delimiter branch 2 times, most recently from ad39750 to 5815f20 Compare July 10, 2017 18:53
Copy link
Collaborator

@budziq budziq left a comment

Choose a reason for hiding this comment

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

@alisha17 Good work! Just few minor details below:

  • please update the master TOC in intro.md
  • update the description to fixes #229 so the issue will autoclose on PR

src/encoding.md Outdated
use csv::ReaderBuilder;
use std::process;

fn run() -> Result<(), Box<Error>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

please do not use Box. We prefer error_chain for the sake of conformity

src/encoding.md Outdated
Ok(())
}

fn main() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

PLease use error_chain's quick_main

src/encoding.md Outdated
use std::process;

fn run() -> Result<(), Box<Error>> {
let data = "\
Copy link
Collaborator

Choose a reason for hiding this comment

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

is the extra linebreak needed here?

src/encoding.md Outdated
Mark-Melbourne-46
Ashley-Zurich-92";

let mut reader = ReaderBuilder::new().delimiter(b'-').from_reader(data.as_bytes());
Copy link
Collaborator

Choose a reason for hiding this comment

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

please mention and link the delimiter method

src/encoding.md Outdated

let mut reader = ReaderBuilder::new().delimiter(b'-').from_reader(data.as_bytes());
for result in reader.records() {
let record = result?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need this extra line? why not use ? inside the println!?

@brson
Copy link
Contributor

brson commented Jul 19, 2017

Looks good but needs a rebase to deal with the merge conflict.

@brson
Copy link
Contributor

brson commented Jul 25, 2017

I rebased and merged manually. thanks @alisha17

@brson brson closed this Jul 25, 2017
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.

add "read csv records with different delimeter"
3 participants