From d7cdd56df49436f59cecd08fef8d8114db7cb76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ho=C3=A0ng=20=C4=90=E1=BB=A9c=20Hi=E1=BA=BFu?= Date: Mon, 1 Jan 2018 14:03:49 +0700 Subject: [PATCH] memchr: fix variable name in docstrings --- src/libcore/slice/memchr.rs | 4 ++-- 1 file 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 { // 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 { 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 { // Scan for a single byte value by reading two `usize` words at a time. //