aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/rustdoc_test_builder.rs
diff options
context:
space:
mode:
authorTamir Duberstein <[email protected]>2025-04-16 17:15:42 +0000
committerDanilo Krummrich <[email protected]>2025-04-23 10:05:22 +0000
commit1b04b466c873f62413bf65a05a558f036660aedc (patch)
tree4f28ce9cc1f562e7c4f827b0f126f36766e5dc01 /scripts/rustdoc_test_builder.rs
parentrust: alloc: add `Vec::dec_len` (diff)
downloadkernel-1b04b466c873f62413bf65a05a558f036660aedc.tar.gz
kernel-1b04b466c873f62413bf65a05a558f036660aedc.zip
rust: alloc: refactor `Vec::truncate` using `dec_len`
Use `checked_sub` to satisfy the safety requirements of `dec_len` and replace nearly the whole body of `truncate` with a call to `dec_len`. Reviewed-by: Andrew Ballance <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Signed-off-by: Tamir Duberstein <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Remove #[expect(unused)] from dec_len(). - Danilo ] Signed-off-by: Danilo Krummrich <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_builder.rs')
0 files changed, 0 insertions, 0 deletions