Skip to content

Commit

Permalink
Need to make filter sendable across awaits
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonke committed Dec 21, 2023
1 parent 995f5b5 commit 0c93afd
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 0c93afd

Please sign in to comment.