File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ impl ByteStr {
3131 ///
3232 /// ## Safety
3333 /// `bytes` must contain valid UTF-8. In a release build it is undefined
34- /// behaviour to call this with `bytes` that is not valid UTF-8.
34+ /// behavior to call this with `bytes` that is not valid UTF-8.
3535 pub unsafe fn from_utf8_unchecked ( bytes : Bytes ) -> ByteStr {
3636 if cfg ! ( debug_assertions) {
3737 match str:: from_utf8 ( & bytes) {
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ impl Extensions {
215215 self . map . as_ref ( ) . map_or ( true , |map| map. is_empty ( ) )
216216 }
217217
218- /// Get the numer of extensions available.
218+ /// Get the number of extensions available.
219219 ///
220220 /// # Example
221221 ///
Original file line number Diff line number Diff line change @@ -1659,13 +1659,13 @@ const SCRATCH_BUF_OVERFLOW: usize = SCRATCH_BUF_SIZE + 1;
16591659fn uninit_u8_array ( ) -> [ MaybeUninit < u8 > ; SCRATCH_BUF_SIZE ] {
16601660 let arr = MaybeUninit :: < [ MaybeUninit < u8 > ; SCRATCH_BUF_SIZE ] > :: uninit ( ) ;
16611661 // Safety: assume_init() is claiming that an array of MaybeUninit<>
1662- // has been initilized , but MaybeUninit<>'s do not require initilizaton .
1662+ // has been initialized , but MaybeUninit<>'s do not require initialization .
16631663 unsafe { arr. assume_init ( ) }
16641664}
16651665
1666- // Assuming all the elements are initilized , get a slice of them.
1666+ // Assuming all the elements are initialized , get a slice of them.
16671667//
1668- // Safety: All elements of `slice` must be initilized to prevent
1668+ // Safety: All elements of `slice` must be initialized to prevent
16691669// undefined behavior.
16701670unsafe fn slice_assume_init < T > ( slice : & [ MaybeUninit < T > ] ) -> & [ T ] {
16711671 & * ( slice as * const [ MaybeUninit < T > ] as * const [ T ] )
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ impl Authority {
2424 // Not public while `bytes` is unstable.
2525 pub ( super ) fn from_shared ( s : Bytes ) -> Result < Self , InvalidUri > {
2626 // Precondition on create_authority: trivially satisfied by the
27- // identity clousre
27+ // identity closure
2828 create_authority ( s, |s| s)
2929 }
3030
Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ impl Scheme2<usize> {
302302 // Return scheme
303303 return Ok ( Scheme2 :: Other ( i) ) ;
304304 }
305- // Invald scheme character, abort
305+ // Invalid scheme character, abort
306306 0 => break ,
307307 _ => { }
308308 }
@@ -349,10 +349,10 @@ mod test {
349349
350350 #[ test]
351351 fn invalid_scheme_is_error ( ) {
352- Scheme :: try_from ( "my_funky_scheme" ) . expect_err ( "Unexpectly valid Scheme" ) ;
352+ Scheme :: try_from ( "my_funky_scheme" ) . expect_err ( "Unexpectedly valid Scheme" ) ;
353353
354354 // Invalid UTF-8
355- Scheme :: try_from ( [ 0xC0 ] . as_ref ( ) ) . expect_err ( "Unexpectly valid Scheme" ) ;
355+ Scheme :: try_from ( [ 0xC0 ] . as_ref ( ) ) . expect_err ( "Unexpectedly valid Scheme" ) ;
356356 }
357357
358358 fn scheme ( s : & str ) -> Scheme {
You can’t perform that action at this time.
0 commit comments