Methods from Deref in search

โš“ Rust    ๐Ÿ“… 2026-02-25    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 4      

surdeus

I just wondered why searching doesn't bring up Vec::iter_mut.

Search iter_mut, no Vec::iter_mut

Search iter_mut vec, no results

Turns out Vec doesn't have that method itself but "obtained" it via Deref.

I'm thinking what it'll feel like if rustdoc search shows methods from Deref. One immediate risk is that it'll be more cluttery, but it'll probably be more natural because I don't think that Vec's iter_mut is from a slice type when I type it. That probably means it might better be switchable.

Any thoughts?

2 posts - 2 participants

Read full topic

๐Ÿท๏ธ Rust_feed