summaryrefslogtreecommitdiffstats
path: root/src/db/models/image.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-11-08 19:36:01 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-11-08 19:57:04 +0100
commit54106763f8e5bd81d0255d9537c5334dc68b1b30 (patch)
tree7d4bec6d105a13d773d781030f31461bdd7d53c6 /src/db/models/image.rs
parentece5906ff20aee0e3f436b0c2c8a7dc8e6e9795e (diff)
Fix: build_package_filter_by_dependency_name() filters can fail
This fixes an issue with the build_package_filter_by_dependency_name() function, which generated a filters::filter::Filter<Package>. Though, these filters can fail because the dependency string it filters for must be parsed to be matched against. Because the `Package` type does not store the parsed information, but the "raw" string from the TOML, this parsing process is necessary. This patch changes the function to return a failable filter (a filter that returns `Result<bool>`). These results must be handled in the main() function (actually in the subcommand implementation), which is done in this patch as well. Tests were adapted accordingly, which required adding a proper version constraint string in the test Package instances. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/db/models/image.rs')
0 files changed, 0 insertions, 0 deletions