Skip to content

Commit

Permalink
Merge pull request #6 from Jonke/main
Browse files Browse the repository at this point in the history
Need to make filter sendable across awaits
  • Loading branch information
keaz committed Dec 21, 2023
2 parents 995f5b5 + 0c93afd commit d055929
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
///

/// The `Filter` trait is implemented by all the filters.
pub trait Filter {
pub trait Filter: Send {
fn filter(&self) -> String;
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl LdapClient {
&mut self,
base: &str,
scope: Scope,
filter: &dyn Filter,
filter: &(impl Filter+?Sized),
attributes: &Vec<&str>,
) -> Result<SearchEntry, Error> {
let search = self
Expand Down Expand Up @@ -310,7 +310,7 @@ impl LdapClient {
&mut self,
base: &str,
scope: Scope,
filter: &dyn Filter,
filter: &impl Filter,
attributes: &Vec<&str>,
) -> Result<T, Error> {
let search_entry = self.search_innter(base, scope, filter, attributes).await?;
Expand Down

0 comments on commit d055929

Please sign in to comment.