Files
rust/library/alloc/src
Matthias Krüger 3eb7fe32a1 Rollup merge of #120180 - Zalathar:vec-split-off-alternatives, r=dtolnay
Document some alternatives to `Vec::split_off`

One of the discussion points that came up in #119917 is that some people use `Vec::split_off` in cases where they probably shouldn't, because the alternatives (like `mem::take`) are hard to discover.

This PR adds some suggestions to the documentation of `split_off` that should point people towards alternatives that might be more appropriate for their use-case.

I've deliberately tried to keep these changes as simple and uncontroversial as possible, so that they don't depend on how the team decides to handle the concerns raised in #119917. That's why I haven't touched the existing documentation for `split_off`, and haven't added links to `split_off` to the documentation of other methods.
2024-01-21 12:28:55 +01:00
..
2023-12-14 19:08:36 -05:00
2023-12-11 23:38:48 +01:00
2023-12-10 10:56:22 +08:00
2023-12-10 10:56:22 +08:00
2023-11-28 09:02:34 +08:00
2023-10-05 18:21:47 -04:00
2024-01-07 03:44:04 +01:00
2023-12-30 16:28:00 +09:00
2023-08-15 14:26:14 -05:00
2023-12-10 10:56:22 +08:00