We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unsafe
pop_terminator
1 parent f9616cf commit 943cfd8Copy full SHA for 943cfd8
src/c_string.rs
@@ -223,7 +223,8 @@ impl<const N: usize> CString<N> {
223
&mut self,
224
additional: &[u8],
225
) -> Result<(), CapacityError> {
226
- self.pop_terminator();
+ // SAFETY: A caller is responsible for adding a nul terminator back to the inner buffer.
227
+ unsafe { self.pop_terminator() }
228
229
self.inner.extend_from_slice(additional)
230
}
0 commit comments