MaybeUninit inherent slice methods part 2 by clarfonthey · Pull Request #135394 · rust-lang/rust (original) (raw)
(Personally I prefer keeping
fillandfill_within the names to be consistent with slice, along the lines of Amanieu'sfill_initsuggestion at #129259 (comment).)
Also adding context that may be missed because the PR was split: copy_from_slice and clone_from_slice were renamed to write_copy_of_slice and write_clone_of_slice to add "write" in the name, so, unless renaming those is also desired, we would probably want to go with write_filled and write_filled_with instead of fill_init and fill_with_init.
In terms of fill_from, I especially prefer the name write_iter because, among other things, it actually might not full the entire slice if the iterator is too short. The result returned will be filled, but, it's not necessarily the length of the buffer, which could be confusing.