Replace Query and QueryOption with better API #35

Merged
wojtek merged 3 commits from 34---replace-query-and-queryoption-with-better-api into main 2023-04-14 10:24:24 +02:00
Showing only changes of commit 318473c5fe - Show all commits

View File

@ -69,13 +69,8 @@ impl ToBeetsArgs for Query {
fn to_args(&self) -> Vec<String> { fn to_args(&self) -> Vec<String> {
let mut arguments: Vec<String> = vec![]; let mut arguments: Vec<String> = vec![];
for field in self.include.iter() { arguments.extend(self.include.iter().map(|field| field.to_arg(true)));
arguments.push(field.to_arg(true)); arguments.extend(self.exclude.iter().map(|field| field.to_arg(false)));
}
for field in self.exclude.iter() {
arguments.push(field.to_arg(false));
}
arguments arguments
} }