🏡 index : ~doyle/fwloki.git

author Jordan Doyle <jordan@doyle.la> 2020-05-24 16:44:15.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2020-05-24 16:44:15.0 +01:00:00
commit
c510cd1db7176646a7ae256ccc111762cdd13151 [patch]
tree
a7f84f3105a8b5dfe3c05d48e846646af34090e4
parent
8cd3bab815f5e48d905efd708ec441fc9fcffb4c
download
c510cd1db7176646a7ae256ccc111762cdd13151.tar.gz

fix: last parameter not matching in parser



Diff

 src/parser.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/parser.rs b/src/parser.rs
index b8cb88c..cbea93a 100644
--- a/src/parser.rs
+++ a/src/parser.rs
@@ -1,11 +1,9 @@
use nom::bytes::complete::take_until;

use std::collections::HashMap;

use chrono::offset::TimeZone;
use chrono::{DateTime, Datelike, Utc};
use nom::{
    bytes::complete::{tag, take},
    bytes::complete::{tag, take, take_till, take_until},
    IResult,
};

@@ -75,7 +73,7 @@
fn parse_kvs(i: &str) -> IResult<&str, HashMap<&str, &str>> {
    let (i, kvs) = nom::multi::separated_list0(
        nom::character::complete::char(' '),
        nom::sequence::separated_pair(take_until("="), tag("="), take_until(" ")),
        nom::sequence::separated_pair(take_until("="), tag("="), take_till(|c| c == ' ')),
    )(i)?;

    let mut map = HashMap::new();