diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2024-07-14 17:14:55 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2024-07-14 17:17:55 -0700 |
| commit | df353a0cc3eaf66c496e07232ceb06a91fc10e67 (patch) | |
| tree | a3cfa6aca024d52a788ffe49e0b7db1f4eff2ac4 /library/std/src/io/cursor.rs | |
| parent | 83a0fe53967ef12411cb7f954a7ad52bee20dc56 (diff) | |
| download | rust-df353a0cc3eaf66c496e07232ceb06a91fc10e67.tar.gz rust-df353a0cc3eaf66c496e07232ceb06a91fc10e67.zip | |
std: Unsafe-wrap std::io
Diffstat (limited to 'library/std/src/io/cursor.rs')
| -rw-r--r-- | library/std/src/io/cursor.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/io/cursor.rs b/library/std/src/io/cursor.rs index a1a8b2a3505..2ed64a40495 100644 --- a/library/std/src/io/cursor.rs +++ b/library/std/src/io/cursor.rs @@ -482,7 +482,7 @@ where A: Allocator, { debug_assert!(vec.capacity() >= pos + buf.len()); - vec.as_mut_ptr().add(pos).copy_from(buf.as_ptr(), buf.len()); + unsafe { vec.as_mut_ptr().add(pos).copy_from(buf.as_ptr(), buf.len()) }; pos + buf.len() } |
