Split db::Connection implementation in submodules (db::user and db::recipe).

This commit is contained in:
Greg Burri 2024-12-18 23:10:19 +01:00
parent 4248d11aa9
commit fce4eade73
17 changed files with 1307 additions and 1234 deletions

View file

@ -7,14 +7,14 @@
{% block main_container %}
<nav class="recipes-list">
<ul>
{% for (id, title) in recipes %}
{% for (id, title) in recipes.list %}
<li>
{% match current_recipe_id %}
{% match recipes.current_id %}
{# Don't know how to avoid
repetition: comparing (using '==' or .eq()) current_recipe_id.unwrap() and id doesn't work.
repetition: comparing (using '==' or .eq()) recipes.current_recipe_id.unwrap() and id doesn't work.
Guards for match don't exist.
See: https://github.com/djc/askama/issues/752 #}
{% when Some (current_id) %}
{% when Some(current_id) %}
{% if current_id == id %}
{% call recipe_item(id, title, "recipe-item-current") %}
{% else %}