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

Projects
None yet
3 participants
@alisha17
Copy link
Contributor

alisha17 commented Jul 10, 2017

fixes #229

@alisha17 alisha17 force-pushed the alisha17:csv_delimiter branch 2 times, most recently from ad39750 to 5815f20 Jul 10, 2017

@budziq
Copy link
Collaborator

budziq left a comment

@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
use csv::ReaderBuilder;
use std::process;
fn run() -> Result<(), Box<Error>> {

This comment has been minimized.

@budziq

budziq Jul 11, 2017

Collaborator

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

Ok(())
}
fn main() {

This comment has been minimized.

@budziq

budziq Jul 11, 2017

Collaborator

PLease use error_chain's quick_main

use std::process;
fn run() -> Result<(), Box<Error>> {
let data = "\

This comment has been minimized.

@budziq

budziq Jul 11, 2017

Collaborator

is the extra linebreak needed here?

Mark-Melbourne-46
Ashley-Zurich-92";
let mut reader = ReaderBuilder::new().delimiter(b'-').from_reader(data.as_bytes());

This comment has been minimized.

@budziq

budziq Jul 11, 2017

Collaborator

please mention and link the delimiter method

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

This comment has been minimized.

@budziq

budziq Jul 11, 2017

Collaborator

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

@alisha17 alisha17 force-pushed the alisha17:csv_delimiter branch from 53748af to fa47ae2 Jul 15, 2017

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Jul 19, 2017

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

@alisha17 alisha17 force-pushed the alisha17:csv_delimiter branch from fa47ae2 to e4db551 Jul 19, 2017

@brson

This comment has been minimized.

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
You can’t perform that action at this time.