Return unit from add_* fns

This commit is contained in:
Matt Green 2016-09-23 14:00:26 -06:00
parent 0892da59e2
commit b08880d4e4

View file

@ -37,18 +37,18 @@ impl NotificationFilter {
Ok(())
}
pub fn add_filter(&mut self, pattern: &str) -> Result<Pattern, PatternError> {
pub fn add_filter(&mut self, pattern: &str) -> Result<(), PatternError> {
let compiled = try!(self.pattern_for(pattern));
self.filters.push(compiled.clone());
Ok(compiled)
Ok(())
}
pub fn add_ignore(&mut self, pattern: &str) -> Result<Pattern, PatternError> {
pub fn add_ignore(&mut self, pattern: &str) -> Result<(), PatternError> {
let compiled = try!(self.pattern_for(pattern));
self.ignores.push(compiled.clone());
Ok(compiled)
Ok(())
}
fn pattern_for(&self, p: &str) -> Result<Pattern, PatternError> {