Skip to content

Commit

Permalink
Add erro handle TODO on the auto env parser
Browse files Browse the repository at this point in the history
  • Loading branch information
workanator committed Nov 18, 2015
1 parent d95c8d3 commit 8852ac2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,10 @@ named!(auto_env_scalar_value<&[u8], ScalarValue>,
|| {} )),
|| {
use std::env;
// TODO(filipegoncalves) Handle error case
// NOTE(workanator) I think that is the proper implementation on the parser which
// should not generate any errors here. Contact me if you like
// to discuss that.
if let Ok(value) = env::var(&n) {
if let IResult::Done(_, output) = bool_true_value(value.as_bytes()) {
output
Expand Down

0 comments on commit 8852ac2

Please sign in to comment.