{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreieiq6hscuzhnhgc6kxl4ckudn5j5hosg6r7n3grcymrdih3zmk67m",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mjdudbfi7ww2"
},
"path": "/t/pre-rfc-peeking-from-peekable-with-less-unwrapping/24169#post_2",
"publishedAt": "2026-04-13T01:16:45.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"Peekable::next_if_map"
],
"textContent": "There's Peekable::next_if_map which acts similarly, but your API can do a few things it can't (although it isn't very good at doing the \"map\" part of that API). It reminds me of the difference between the normal map APIs and the entry-based APIs.\n\nNote that if your API offers enough over `next_if_map` to be worth adding as a stable API, it should probably have a `Peeked::get_mut` (which allows changing the value in the peek slot): I can't think of any reason not to add it and it would be consistent with the other APIs.",
"title": "[Pre-RFC] Peeking from Peekable with less unwrapping"
}