Compare commits
1 commit
f7767d9f31
...
d63b39487d
Author | SHA1 | Date | |
---|---|---|---|
Tristan Daniël Maat | d63b39487d |
|
@ -17,7 +17,7 @@ fn parse_passports(input: &str) -> Result<Vec<HashMap<&str, &str>>, &str> {
|
|||
.trim()
|
||||
.split(|c| c == ' ' || c == '\n')
|
||||
.map(|field| {
|
||||
let split = field.find(':').ok_or("Invalid passport entry; no separator")?;
|
||||
let split = field.find(':').ok_or("Invalid passport value")?;
|
||||
let item = field.split_at(split);
|
||||
|
||||
let key = item.0;
|
||||
|
|
Loading…
Reference in a new issue