From 8f8f24e12a7d0f6a89534d45cb58d94ffb539aca Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 15 Aug 2023 16:39:40 -0700 Subject: [PATCH] Correct comment on String::copy_into_slice --- soroban-sdk/src/string.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soroban-sdk/src/string.rs b/soroban-sdk/src/string.rs index 147afb21e..c335f6889 100644 --- a/soroban-sdk/src/string.rs +++ b/soroban-sdk/src/string.rs @@ -211,8 +211,8 @@ impl String { /// Copy the bytes in [String] into the given slice. /// - /// The minimum number of bytes are copied to either exhaust [String] or fill - /// slice. + /// The number of bytes copied is dictated by the size of `slice`, + /// and if the [String] is not long enough the call traps. #[inline(always)] pub fn copy_into_slice(&self, slice: &mut [u8]) { let env = self.env();