diff --git a/src/filter.rs b/src/filter.rs index d49136c..f76f175 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -4,7 +4,7 @@ /// /// The `Filter` trait is implemented by all the filters. -pub trait Filter { +pub trait Filter: Send { fn filter(&self) -> String; } diff --git a/src/lib.rs b/src/lib.rs index ac8979c..638ef8d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -169,7 +169,7 @@ impl LdapClient { &mut self, base: &str, scope: Scope, - filter: &dyn Filter, + filter: &(impl Filter+?Sized), attributes: &Vec<&str>, ) -> Result { let search = self @@ -310,7 +310,7 @@ impl LdapClient { &mut self, base: &str, scope: Scope, - filter: &dyn Filter, + filter: &impl Filter, attributes: &Vec<&str>, ) -> Result { let search_entry = self.search_innter(base, scope, filter, attributes).await?;