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();