indexer: Rust crate updates

This commit is contained in:
Yorhel 2017-01-17 11:01:11 +01:00
parent 1923b9901d
commit d720441fb4
8 changed files with 140 additions and 126 deletions

View file

@ -103,9 +103,9 @@ fn splitver(n: &str) -> Option<(&str, &str)> {
static ref RE2: Regex = Regex::new("^(.+)-([^-]+)$").unwrap();
);
if let Some(cap) = RE1.captures(n) {
Some((cap.at(1).unwrap(), cap.at(2).unwrap()))
Some((cap.get(1).unwrap().as_str(), cap.get(2).unwrap().as_str()))
} else if let Some(cap) = RE2.captures(n) {
Some((cap.at(1).unwrap(), cap.at(2).unwrap()))
Some((cap.get(1).unwrap().as_str(), cap.get(2).unwrap().as_str()))
} else {
None
}