Skip to content

Commit

Permalink
Ignore whitespace when parsing parameters
Browse files Browse the repository at this point in the history
Ignore leading or trailing whitespace when parsing parameters.
This allows spaces before/after commas, and before or after '='
  • Loading branch information
A-Walrus committed Jun 13, 2022
1 parent 4065a21 commit e2d59c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/fj-app/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ fn parse_parameters(input: &str) -> anyhow::Result<Parameters> {
let key = parameter
.next()
.ok_or_else(|| anyhow!("Expected model parameter key"))?
.trim()
.to_owned();
let value = parameter
.next()
.ok_or_else(|| anyhow!("Expected model parameter value"))?
.trim()
.to_owned();

parameters.0.insert(key, value);
Expand Down

0 comments on commit e2d59c3

Please sign in to comment.