3 ms·
It's not always so bad :) https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=097719766a5dc1ae2703813565793f5e https://play.rust-lang.org/?v
by oconnor663 4y ago
It's not always so bad :) https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=097719766a5dc1ae2703813565793f5e https://play.rust-lang.org/?version=stable&mode=debug&editio...
- ok123456 4y agoNow try to actually do that in a larger program without static lifetimes...
- piperswe 4y agoIt shouldn't be too bad as long as you keep in mind that it is a reference to an item in that slice, so whatever that slice is pointing to needs to stick around as long as you're using elements from it. I don't often encounter borrow checker issues anymore, because once you program Rust long enough you know what things need to live for what lifetimes, and you architect your "larger programs" around that.