chore: bit of cleanup

This commit is contained in:
Jef Roosens 2024-05-27 13:47:53 +02:00
parent bf100049b1
commit 32e27978ec
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
5 changed files with 7 additions and 26 deletions

View file

@ -9,7 +9,10 @@ pub struct Filter {
impl IntoCondition for Filter {
fn into_condition(self) -> Condition {
Condition::all().add_option(self.name.map(|name| package::Column::Name.like(name)))
Condition::all().add_option(
self.name
.map(|name| repo::Column::Name.like(format!("%{}%", name))),
)
}
}