about summary refs log tree commit diff
path: root/library/std/src/io/cursor.rs
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2024-07-14 17:14:55 -0700
committerJubilee Young <workingjubilee@gmail.com>2024-07-14 17:17:55 -0700
commitdf353a0cc3eaf66c496e07232ceb06a91fc10e67 (patch)
treea3cfa6aca024d52a788ffe49e0b7db1f4eff2ac4 /library/std/src/io/cursor.rs
parent83a0fe53967ef12411cb7f954a7ad52bee20dc56 (diff)
downloadrust-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.rs2
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()
 }