Comment Comment by masklinn > I understand why you need the into_iter bit and why the borrow checker complains about itThe borrow checker is not really involved in the first snippet (in fact the solution involves borrowing). The compiler literally just prevents a UAF. parent masklinn 1 year ago
The borrow checker is not really involved in the first snippet (in fact the solution involves borrowing). The compiler literally just prevents a UAF.