aboutsummaryrefslogtreecommitdiff
path: root/src/util/smallcharset.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-04-08 12:42:04 +0200
committerMartin Fischer <martin@push-f.com>2021-04-08 15:40:48 +0200
commite0bef0105e0cc64bb610889b6921fd94897431d9 (patch)
tree4601b8a86778c10b65d232f99c1f5fd4b289c22a /src/util/smallcharset.rs
parent8bb20dcdeec57b2109b05351663ec1dba9c65f84 (diff)
drop tendril dependency
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);