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

An example with stdin #84

Closed
tikue opened this issue Feb 13, 2017 · 2 comments
Closed

An example with stdin #84

tikue opened this issue Feb 13, 2017 · 2 comments
Milestone

Comments

@tikue
Copy link

tikue commented Feb 13, 2017

What's the right way to parse input from stdin? I'm hitting lifetime issues when reading into a String and passing that to parse.

@Marwes
Copy link
Owner

Marwes commented Feb 13, 2017

You can use from_read to parse from something implementing std::io::Read (such as stdin). It will probably be a bit slower than reading it into a string first though.

@Marwes Marwes added this to the 3.0 milestone Aug 21, 2017
@Marwes
Copy link
Owner

Marwes commented Mar 8, 2018

Both the ini and the date examples display how to parse from stdin (or anything else that implements Read). Closing.

@Marwes Marwes closed this as completed Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants