diff --git a/Cargo.toml b/Cargo.toml index aadc5ba..ef71eab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actiondb" -version = "0.2.0" +version = "0.2.1" authors = ["Tibor Benke "] [[bin]] diff --git a/src/bin/adbtool.rs b/src/bin/adbtool.rs index 534f770..4379015 100644 --- a/src/bin/adbtool.rs +++ b/src/bin/adbtool.rs @@ -10,7 +10,7 @@ use actiondb::matcher::Factory; use log::{LogLevelFilter}; use actiondb::utils::logger::StdoutLogger; -const VERSION: &'static str = "0.2.0"; +const VERSION: &'static str = "0.2.1"; const AUTHOR: &'static str = "Tibor Benke "; const APPNAME: &'static str = "adbtool"; diff --git a/src/matcher/matcher/mod.rs b/src/matcher/matcher/mod.rs index 08705aa..a407bf8 100644 --- a/src/matcher/matcher/mod.rs +++ b/src/matcher/matcher/mod.rs @@ -7,4 +7,5 @@ pub mod builder; pub trait Matcher: fmt::Debug { fn parse<'a, 'b>(&'a self, text: &'b str) -> Option>; fn add_pattern(&mut self, pattern: Pattern); + fn boxed_clone(&self) -> Box; } diff --git a/src/matcher/trie/matcher.rs b/src/matcher/trie/matcher.rs index 3fe99b6..d0c2842 100644 --- a/src/matcher/trie/matcher.rs +++ b/src/matcher/trie/matcher.rs @@ -10,4 +10,7 @@ impl Matcher for ParserTrie { fn add_pattern(&mut self, pattern: Pattern) { self.insert(pattern); } + fn boxed_clone(&self) -> Box { + Box::new(self.clone()) + } }