cleanup syntax

This commit is contained in:
Aleksey Kladov 2019-04-14 23:04:08 +03:00
parent e6f32c6d3a
commit b228947b68
3 changed files with 34 additions and 8 deletions

View file

@ -104,6 +104,10 @@ pub struct Filter {
}
impl Filter {
pub fn disabled() -> Filter {
Filter::new(0, Vec::new())
}
pub fn new(depth: usize, allowed: Vec<String>) -> Filter {
Filter { depth, allowed }
}