how to divorce two impl?

Help! I want to divorce ReadFn from ListFN - bypassing the Queries mutual closure behavior so I can better isolate some logic. My need is to get an independent ListFn...

fn queries_<'a>() -> Queries<
  impl ReadFn<'a, PostView, (PostId, Option, bool)>,
  impl ListFn<'a, PostView, PostQuery<'a>>,
> {

Context: https://github.com/LemmyNet/lemmy/blob/main/crates/db_views/src/post_view.rs

For sake of clarity... I'm not wanting to break the whole Queries joined closure marriage project-wide, just this one source file I want to be able to copy/paste this code twice and have just a single closure for ListFn.

Thank you.

10 points · 3 comments · view on lemmy.world

3 Comments

Rustmilian@lemmy.world · 1 pts · 2y
[ removed ]
Vorpal@programming.dev · -1 pts · 2y (2 replies)

Unfortunately your code here in this post is unreadable with the buggy html escaping in it. Consider posting to the official rust playground and creating a shared link. And/or report a bug to lemmy about the broken quoting.

RoundSparrow@lemmy.ml · 6 pts · 2y (1 reply)

report a bug to lemmy about the broken quoting.

I have, weeks ago.

Consider posting to the official rust playground and creating a shared link.

I did share a link to GitHub, is that not good enough or something? Here is a screen shot for you.

Vorpal@programming.dev · 2 pts · 2y

Oh, this seems to be specific to the SQL framework you use after looking into it. I thought it was a general rust question about function parameters, sorry. Unfortunately I'm not familiar with that sql framework (or any other, I'm an embedded developer, not a web dev).

Hope you find someone who knows diesel, and sorry again I couldn't help you.