Skip to content

Commit d6d6064

Browse files
committed
Work around borrow checking change in nightly-2018-01-11
rust-lang/rust#47349
1 parent 5c1ee60 commit d6d6064

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "brotli"
3-
version = "1.1.1"
3+
version = "1.1.2"
44
authors = ["Daniel Reiter Horn <[email protected]>", "The Brotli Authors"]
55
description = "A brotli decompressor that with an interface avoiding the rust stdlib. This makes it suitable for embedded devices and kernels. It is designed with a pluggable allocator so that the standard lib's allocator may be employed. The default build also includes a stdlib allocator and stream interface. Disable this with --features=no-stdlib. All included code is safe."
66
license = "BSD-3-Clause/MIT"
@@ -29,4 +29,4 @@ no-stdlib = ["alloc-no-stdlib/no-stdlib", "brotli-decompressor/no-stdlib"]
2929
external-literal-probability = []
3030
disable-timer = ["brotli-decompressor/disable-timer"]
3131
benchmark = ["brotli-decompressor/benchmark"]
32-
vector_scratch_space = []
32+
vector_scratch_space = []

src/enc/backward_references.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,9 @@ impl<T: SliceWrapperMut<u32> + SliceWrapper<u32> + BasicHashComputer> AnyHasher
335335
out,
336336
1i32);
337337
}
338+
let bucket_sweep = self.buckets_.BUCKET_SWEEP() as usize;
338339
(*self).buckets_.slice_mut()[(key as (usize)).wrapping_add((cur_ix >> 3)
339-
.wrapping_rem(self.buckets_.BUCKET_SWEEP() as
340-
usize))] = cur_ix as (u32);
340+
.wrapping_rem(bucket_sweep))] = cur_ix as (u32);
341341
is_match_found != 0
342342

343343
}

0 commit comments

Comments
 (0)