Skip to content

Commit

Permalink
MatchResult: add values field
Browse files Browse the repository at this point in the history
Signed-off-by: Tibor Benke <ihrwein@gmail.com>
  • Loading branch information
ihrwein committed Aug 19, 2015
1 parent c231de5 commit 1a0dad2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/matcher/result.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
use std::collections::BTreeMap;

use matcher::Pattern;

#[derive(Debug)]
pub struct MatchResult<'a, 'b> {
key_value_pairs: Vec<(&'a str, &'b str)>,
pattern: &'a Pattern
pattern: &'a Pattern,
values: BTreeMap<&'a str, &'b str>
}

impl <'a, 'b> MatchResult<'a, 'b> {
pub fn new(pattern: &'a Pattern) -> MatchResult<'a, 'b> {
MatchResult{
key_value_pairs: Vec::new(),
pattern: pattern
pattern: pattern,
values: BTreeMap::new()
}
}

Expand Down

0 comments on commit 1a0dad2

Please sign in to comment.