Fix backwards-incompatibilities of regex crate
This commit is contained in:
parent
6e47ce8de7
commit
b59fcdffcd
1 changed files with 4 additions and 2 deletions
|
@ -75,10 +75,12 @@ impl IntoKeyValue<String, String> for String {
|
|||
.unwrap();
|
||||
}
|
||||
R.captures(&self[..])
|
||||
.map(|caps| caps.name("VALUE").or(caps.name("QVALUE")).unwrap_or(""))
|
||||
.map(|c| c.name("VALUE").or(c.name("QVALUE")).map(|m| m.as_str()).unwrap_or(""))
|
||||
};
|
||||
|
||||
key.and_then(|k| value.and_then(|v| Some(KeyValue::new(String::from(k), String::from(v)))))
|
||||
key.and_then(|k| {
|
||||
value.and_then(|v| Some(KeyValue::new(String::from(k.as_str()), String::from(v))))
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue