• 1 Post
  • 13 Comments
Joined 1 year ago
cake
Cake day: September 2nd, 2023

help-circle






  • I don’t think the problem is in the closure itself, since pstmt isn’t used inside the closure. To me, it looks like rec_iter has the lifetime of pstmt.

    pstmt is dropped at the end of the function. However, rec_iter isn’t dropped at the end of the function (it is returned). You should either pass pstmt from outside the function as a reference and have zknotestream a lifetime smaller than pstmt, or return pstmt along with rec_iter. Idk if the last option is detected by rust though.