about summary refs log tree commit diff
path: root/src/libcore/slice
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-01-03 16:58:00 +0800
committerGitHub <noreply@github.com>2018-01-03 16:58:00 +0800
commit2182f1431c93cda5fc4ec579d2f65d38c743b220 (patch)
tree23596d979f8fbee1c781dccd5d1b5c854f50e167 /src/libcore/slice
parentd6cf5a56ac96e908aa762e501e589d8a95c7d971 (diff)
parentd7cdd56df49436f59cecd08fef8d8114db7cb76a (diff)
Rollup merge of #47118 - hdhoang:patch-2, r=BurntSushi
memchr: fix variable name in docstrings

upstream BurntSushi/rust-memchr#24

r=BurntSushi
Diffstat (limited to 'src/libcore/slice')
-rw-r--r--src/libcore/slice/memchr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/slice/memchr.rs b/src/libcore/slice/memchr.rs
index 00183be97e7..69c9cb37dcf 100644
--- a/src/libcore/slice/memchr.rs
+++ b/src/libcore/slice/memchr.rs
@@ -56,7 +56,7 @@ fn repeat_byte(b: u8) -> usize {
     rep
 }
 
-/// Return the first index matching the byte `a` in `text`.
+/// Return the first index matching the byte `x` in `text`.
 pub fn memchr(x: u8, text: &[u8]) -> Option<usize> {
     // Scan for a single byte value by reading two `usize` words at a time.
     //
@@ -101,7 +101,7 @@ pub fn memchr(x: u8, text: &[u8]) -> Option<usize> {
     text[offset..].iter().position(|elt| *elt == x).map(|i| offset + i)
 }
 
-/// Return the last index matching the byte `a` in `text`.
+/// Return the last index matching the byte `x` in `text`.
 pub fn memrchr(x: u8, text: &[u8]) -> Option<usize> {
     // Scan for a single byte value by reading two `usize` words at a time.
     //