79686694

Date: 2025-07-02 00:11:49
Score: 0.5
Natty:
Report link

I was able to completely avoid the limitation by eliminating instances of query, and instead putting my "iter()" methods directly on the type.

pub trait Query<S: Storage> {
    type Result<'r>: 'r where S: 'r;

    fn iter(storage: &S) -> Option<impl Iterator<Item = (Entity, Option<Self::Result<'_>>)>>;
    fn iter_chunks(storage: &S, chunk_size: usize) -> Option<impl Iterator<Item = impl Iterator<Item = (Entity, Option<Self::Result<'_>>)>>>;
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: gjh33