Compare commits
1 commit
d63b39487d
...
51b5893d56
Author | SHA1 | Date | |
---|---|---|---|
Tristan Daniël Maat | 51b5893d56 |
|
@ -17,9 +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 value")?;
|
||||
let item = field.split_at(split);
|
||||
|
||||
let item = field.split_at(3);
|
||||
let key = item.0;
|
||||
let value = item
|
||||
.1
|
||||
|
|
Loading…
Reference in a new issue