Commit Graph

13 Commits

Author SHA1 Message Date
Ralf Jung 43eb70ac97 vec::Drain::fill: avoid reference to uninitialized memory 2026-03-20 13:24:11 +01:00
mu001999 ff0f239bb1 Remove redundant self usages 2026-02-25 22:51:53 +08:00
Jeremy Smart 0763954226 add VecDeque::splice 2025-12-29 13:25:56 -05:00
Esteban Küber 0488690d3e Use let...else instead of match foo { ... _ => return }; and if let ... else return in std 2025-12-09 23:35:14 +00:00
Noratrieb 9316d4508c Remove most #[track_caller] from allocating Vec methods
They cause significant binary size overhead while contributing little
value.

Also removes them from the wrapping String methods that do not panic.
2025-09-25 20:52:03 +02:00
DaniPopes f07cc409d3 Rename sub_ptr to offset_from_unsigned in docs 2025-04-28 13:58:27 +02:00
Pavel Grigorenko 0d4259e68e Add #[track_caller] to allocating methods of Vec & VecDeque 2024-09-20 01:20:10 +03:00
Nicholas Nethercote 84ac80f192 Reformat use declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
ozkanonur 4e7c14fe9f enable rust_2018_idioms for doctests
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-05-07 00:12:29 +03:00
The 8472 47014b1bb9 Don't do pointer arithmetic on pointers to deallocated memory
vec::Splice can invalidate the slice::Iter inside vec::Drain.
So we replace them with dangling pointers which, unlike ones to
deallocated memory, are allowed.
2023-01-17 22:01:33 +01:00
Muhammad Mominul Huque 507d97b26e Update expressions where we can use array's IntoIterator implementation 2021-06-02 16:09:04 +06:00
C 2de8356f60 style: applying Rust style 2020-12-29 14:03:30 +00:00
C 17593f258b refactor: moving Splice into splice.rs 2020-12-29 14:03:29 +00:00