Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> silently passing something as "non mut" and it actually does "mut" stuff

No, it's the opposite that's happening here: a mutable borrow of the vector is made, and then a non-mutable thing is done with it (getting the length), before finally mutating it (pushing).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: