Closed weiznich closed 2 days ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.99%. Comparing base (
2a321ff
) to head (dd6eb3a
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This commit replaces some of the manual written type aliases by
#[diesel::dsl::auto_type]
which just generates the correct return type based on the function content. This hopefully removes some complexity from the database code.The main motivation for this change is to update the diesel Composing Applications guide which is based on this code.
I'm not 100% happy with this as it's currently not possible to use
#[auto_type]
for all the the type defs due to the following reasons:#[auto_type]
by default generates a type def alongside the function that names the return type. This cannot easily be done here as associated types for non-trait impls are not stable yet. (That's the reason for theno_type_alias
option)