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 @@ -56,7 +56,7 @@ fn repeat_byte(b: u8) -> usize {
5656 rep
5757}
5858
59- /// Return the first index matching the byte `a ` in `text`.
59+ /// Return the first index matching the byte `x ` in `text`.
6060pub fn memchr ( x : u8 , text : & [ u8 ] ) -> Option < usize > {
6161 // Scan for a single byte value by reading two `usize` words at a time.
6262 //
@@ -101,7 +101,7 @@ pub fn memchr(x: u8, text: &[u8]) -> Option<usize> {
101101 text[ offset..] . iter ( ) . position ( |elt| * elt == x) . map ( |i| offset + i)
102102}
103103
104- /// Return the last index matching the byte `a ` in `text`.
104+ /// Return the last index matching the byte `x ` in `text`.
105105pub fn memrchr ( x : u8 , text : & [ u8 ] ) -> Option < usize > {
106106 // Scan for a single byte value by reading two `usize` words at a time.
107107 //
You can’t perform that action at this time.
0 commit comments