File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ impl CStr {
205205 /// * The memory pointed to by `ptr` must contain a valid nul terminator at the
206206 /// end of the string.
207207 ///
208- /// * `ptr` must be [valid] for reads of bytes up to and including the null terminator.
208+ /// * `ptr` must be [valid] for reads of bytes up to and including the nul terminator.
209209 /// This means in particular:
210210 ///
211211 /// * The entire memory range of this `CStr` must be contained within a single allocated object!
@@ -415,7 +415,7 @@ impl CStr {
415415 let mut i = bytes. len ( ) . saturating_sub ( 1 ) ;
416416 assert ! ( !bytes. is_empty( ) && bytes[ i] == 0 , "input was not nul-terminated" ) ;
417417
418- // Ending null byte exists, skip to the rest.
418+ // Ending nul byte exists, skip to the rest.
419419 while i != 0 {
420420 i -= 1 ;
421421 let byte = bytes[ i] ;
You can’t perform that action at this time.
0 commit comments