aboutsummaryrefslogtreecommitdiff
path: root/src/util/smallcharset.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/smallcharset.rs')
-rw-r--r--src/util/smallcharset.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/smallcharset.rs b/src/util/smallcharset.rs
index aeeb189..2bf8585 100644
--- a/src/util/smallcharset.rs
+++ b/src/util/smallcharset.rs
@@ -41,7 +41,7 @@ impl SmallCharSet {
/// Count the number of bytes of characters at the beginning of `buf` which are not in the set.
///
/// This functionality is used in [`BufferQueue::pop_except_from`].
- pub fn nonmember_prefix_len(&self, buf: &str) -> u32 {
+ pub fn nonmember_prefix_len(&self, buf: &str) -> usize {
let mut n = 0;
for b in buf.bytes() {
if b >= 64 || !self.contains(b) {
@@ -61,7 +61,7 @@ mod test {
#[test]
fn nonmember_prefix() {
for &c in ['&', '\0'].iter() {
- for x in 0..48u32 {
+ for x in 0..48 {
for y in 0..48u32 {
let mut s = repeat("x").take(x as usize).collect::<String>();
s.push(c);