{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiapzll2jcbhzfgo5aaskv7cu7am527p5f6j65rtytsg2hrwj7ocqm",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mmnykdaytxn2"
  },
  "path": "/t/what-is-allocator-by-ref-for/24356#post_5",
  "publishedAt": "2026-05-25T07:14:38.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "FeldrinH:\n\n> Are these just convenience methods with oddly worded documentation?\n\nyes, these are convenience methods. the purpose i would think would be made clear by the example in the iterator case. `x.by_ref().other_method().yet_another()` is meant to be a nicer way to write `(&mut x).other_method().yet_another()`(yes the parentheses are necesary) or for the Allocator case `(&x).other_method().yet_another()`\n\nit is quite unclear to me why there is such a method on `Allocator` though",
  "title": "What is Allocator::by_ref for?"
}