Let me just paste the results here
Compiling brotli v1.0.6 (file:///Users/pascal/Projekte/tools/rust-brotli)
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:45:5
|>
45 |> return BrotliBitReader {
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: BrotliBitReader {
src/bit_reader/mod.rs: val_: 0,
src/bit_reader/mod.rs: bit_pos_: 0,
src/bit_reader/mod.rs: next_in: 0,
src/bit_reader/mod.rs: avail_in: 0,
src/bit_reader/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:63:5
|>
63 |> return BrotliBitReaderState {
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: BrotliBitReaderState {
src/bit_reader/mod.rs: val_: 0,
src/bit_reader/mod.rs: bit_pos_: 0,
src/bit_reader/mod.rs: next_in: 0,
src/bit_reader/mod.rs: avail_in: 0,
src/bit_reader/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:74:3
|>
74 |> return BrotliBitReaderState {
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: BrotliBitReaderState {
src/bit_reader/mod.rs: val_: from.val_,
src/bit_reader/mod.rs: bit_pos_: from.bit_pos_,
src/bit_reader/mod.rs: next_in: from.next_in,
src/bit_reader/mod.rs: avail_in: from.avail_in,
src/bit_reader/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:90:3
|>
90 |> return ((::core::mem::size_of::() as u32) << 3) - br.bit_pos_;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: ((::core::mem::size_of::() as u32) << 3) - br.bit_pos_
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:96:3
|>
96 |> return br.avail_in + (BrotliGetAvailableBits(br) >> 3);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: br.avail_in + (BrotliGetAvailableBits(br) >> 3)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:102:3
|>
102 |> return br.avail_in >= num;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: br.avail_in >= num
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:109:3
|>
109 |> return (fast!((input)[next_in]) as u16) | ((fast!((input)[next_in + 1]) as u16) << 8);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: (fast!((input)[next_in]) as u16) | ((fast!((input)[next_in + 1]) as u16) << 8)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:118:3
|>
118 |> return (four_byte[0] as u32) | ((four_byte[1] as u32) << 8) | ((four_byte[2] as u32) << 16) |
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: (four_byte[0] as u32) | ((four_byte[1] as u32) << 8) | ((four_byte[2] as u32) << 16) |
src/bit_reader/mod.rs: ((four_byte[3] as u32) << 24)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:127:3
|>
127 |> return (eight_byte[0] as u64) | ((eight_byte[1] as u64) << 8) | ((eight_byte[2] as u64) << 16) |
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: (eight_byte[0] as u64) | ((eight_byte[1] as u64) << 8) | ((eight_byte[2] as u64) << 16) |
src/bit_reader/mod.rs: ((eight_byte[3] as u64) << 24) |
src/bit_reader/mod.rs: ((eight_byte[4] as u64) << 32) | ((eight_byte[5] as u64) << 40) |
src/bit_reader/mod.rs: ((eight_byte[6] as u64) << 48) | ((eight_byte[7] as u64) << 56)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:255:3
|>
255 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:262:3
|>
262 |> return br.val_ >> br.bit_pos_;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: br.val_ >> br.bit_pos_
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:270:3
|>
270 |> return (BrotliGetBitsUnmasked(br) & (0xffffffffu32 as reg_t)) as u32;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: (BrotliGetBitsUnmasked(br) & (0xffffffffu32 as reg_t)) as u32
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:276:3
|>
276 |> return (BrotliGetBitsUnmasked(br) as u32) & BitMask(n_bits);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: (BrotliGetBitsUnmasked(br) as u32) & BitMask(n_bits)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:283:3
|>
283 |> return (BrotliGetBitsUnmasked(br) as u32) & BitMask(n_bits);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: (BrotliGetBitsUnmasked(br) as u32) & BitMask(n_bits)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:299:3
|>
299 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:341:5
|>
341 |> return val;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: val
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:349:5
|>
349 |> return low_val | (high_val << 16);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: low_val | (high_val << 16)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:361:5
|>
361 |> return val;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: val
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:369:5
|>
369 |> return low_val | (high_val << 16);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: low_val | (high_val << 16)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:386:3
|>
386 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:397:3
|>
397 |> return pad_bits == 0;
|> ^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: pad_bits == 0
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:414:3
|>
414 |> return -1;
|> ^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: -1
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:459:3
|>
459 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:34:5
|>
34 |> return self.value == other.value && self.bits == other.bits;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: self.value == other.value && self.bits == other.bits
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:40:5
|>
40 |> return HuffmanCode {
|> ^
help: remove `return` as shown:
src/huffman/mod.rs: HuffmanCode {
src/huffman/mod.rs: value: 0,
src/huffman/mod.rs: bits: 0,
src/huffman/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:79:9
|>
79 |> return fast_mut!((self.codes.slice_mut())[start;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: &mut $slice[$start..]
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:84:9
|>
84 |> return & fast_slice!((self.codes)[start;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: & fast_slice!((self.codes)[start;])
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:107:7
|>
107 |> return ret;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: ret
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:114:9
|>
114 |> return HuffmanTreeGroup:: {
|> ^
help: remove `return` as shown:
src/huffman/mod.rs: HuffmanTreeGroup:: {
src/huffman/mod.rs: htrees : AllocU32::AllocatedMemory::default(),
src/huffman/mod.rs: codes : AllocHC::AllocatedMemory::default(),
src/huffman/mod.rs: alphabet_size : 0,
src/huffman/mod.rs: num_htrees : 0,
src/huffman/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:153:3
|>
153 |> return fast!((kReverseBits)[num as usize]) as u32;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: fast!((kReverseBits)[num as usize]) as u32
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:185:3
|>
185 |> return len - root_bits;
|> ^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: len - root_bits
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:378:3
|>
378 |> return total_size as u32;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: total_size as u32
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:472:3
|>
472 |> return goal_size;
|> ^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: goal_size
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:336:9
|>
336 |> return retval;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: retval
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:400:17
|>
400 |> return BrotliGetAvailableBits(&self.br) == 0,
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: BrotliGetAvailableBits(&self.br) == 0,
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:401:18
|>
401 |> _ => return false,
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: _ => false,
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:407:54
|>
407 |> BrotliRunningState::BROTLI_STATE_DONE => return true,
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: BrotliRunningState::BROTLI_STATE_DONE => true,
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:408:18
|>
408 |> _ => return false,
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: _ => false,
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/transform.rs:734:3
|>
734 |> return 3;
|> ^^^^^^^^^
help: remove `return` as shown:
src/transform.rs: 3
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/transform.rs:794:5
|>
794 |> return idx;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/transform.rs: idx
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:74:3
|>
74 |> return BrotliResult::ResultFailure;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultFailure
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:110:3
|>
110 |> return 17;
|> ^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: 17
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:314:3
|>
314 |> return table_element.value as u32;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: table_element.value as u32
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:321:3
|>
321 |> return DecodeSymbol(bit_reader::BrotliGet16BitsUnmasked(br, input), &table, br);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: DecodeSymbol(bit_reader::BrotliGet16BitsUnmasked(br, input), &table, br)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:364:3
|>
364 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:379:3
|>
379 |> return SafeDecodeSymbol(&table, br, result);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: SafeDecodeSymbol(&table, br, result)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:421:3
|>
421 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:430:3
|>
430 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:479:3
|>
479 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:646:3
|>
646 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:713:3
|>
713 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:770:3
|>
770 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:947:3
|>
947 |> return fast_ref!((prefix::kBlockLengthPrefixCode)[code as usize]).offset as u32 +
|> ^
help: remove `return` as shown:
src/decode.rs: fast_ref!((prefix::kBlockLengthPrefixCode)[code as usize]).offset as u32 +
src/decode.rs: bit_reader::BrotliReadBits(br, nbits, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:966:7
|>
966 |> return (true, index);
|> ^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: (true, index)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:968:10
|>
968 |> _ => return (true, block_length_index),
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: _ => (true, block_length_index),
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:992:3
|>
992 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1139:3
|>
1139 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1354:3
|>
1354 |> return retval;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: retval
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1410:3
|>
1410 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1439:3
|>
1439 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1473:3
|>
1473 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1493:3
|>
1493 |> return DecodeCommandBlockSwitchInternal(true, s, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: DecodeCommandBlockSwitchInternal(true, s, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1513:3
|>
1513 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1534:3
|>
1534 |> return DecodeDistanceBlockSwitchInternal(true, s, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: DecodeDistanceBlockSwitchInternal(true, s, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1575:3
|>
1575 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1691:3
|>
1691 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1720:3
|>
1720 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1763:5
|>
1763 |> return bit_reader::BrotliSafeReadBits(br, n_bits, val, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: bit_reader::BrotliSafeReadBits(br, n_bits, val, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1766:5
|>
1766 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1837:3
|>
1837 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1898:3
|>
1898 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1906:3
|>
1906 |> return bit_reader::BrotliWarmupBitReader(br, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: bit_reader::BrotliWarmupBitReader(br, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1913:3
|>
1913 |> return bit_reader::BrotliCheckInputAmount(br, num);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: bit_reader::BrotliCheckInputAmount(br, num)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:2331:3
|>
2331 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:2341:3
|>
2341 |> return ProcessCommandsInternal(false, s, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: ProcessCommandsInternal(false, s, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:2351:3
|>
2351 |> return ProcessCommandsInternal(true, s, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: ProcessCommandsInternal(true, s, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:2908:3
|>
2908 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:67:3
|>
67 |> return BrotliDecompressCustomAlloc(r,
|> ^
help: remove `return` as shown:
src/lib.rs: BrotliDecompressCustomAlloc(r,
src/lib.rs: w,
src/lib.rs: &mut input_buffer[..],
src/lib.rs: &mut output_buffer[..],
src/lib.rs: HeapAlloc:: { default_value: 0 },
src/lib.rs: HeapAlloc:: { default_value: 0 },
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:114:3
|>
114 |> return BrotliDecompressCustomIo(&mut IoReaderWrapper::(r),
|> ^
help: remove `return` as shown:
src/lib.rs: BrotliDecompressCustomIo(&mut IoReaderWrapper::(r),
src/lib.rs: &mut IoWriterWrapper::(w),
src/lib.rs: input_buffer,
src/lib.rs: output_buffer,
src/lib.rs: alloc_u8,
src/lib.rs: alloc_u32,
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:238:9
|>
238 |> return DecompressorCustomAlloc::(
|> ^
help: remove `return` as shown:
src/lib.rs: DecompressorCustomAlloc::(
src/lib.rs: DecompressorCustomIo::,
src/lib.rs: BufferType,
src/lib.rs: AllocU8, AllocU32, AllocHC>::new(IntoIoReader::(r),
src/lib.rs: buffer,
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:260:8
|>
260 |> return self.0.read(buf);
|> ^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: self.0.read(buf)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:281:5
|>
281 |> return Decompressor::(DecompressorCustomAlloc:: ^
help: remove `return` as shown:
src/lib.rs: Decompressor::(DecompressorCustomAlloc::
src/lib.rs: as Allocator>::AllocatedMemory,
src/lib.rs: HeapAlloc,
src/lib.rs: HeapAlloc,
src/lib.rs: HeapAlloc >::new(r,
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:325:5
|>
325 |> return self.0.read(buf);
|> ^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: self.0.read(buf)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:372:9
|>
372 |> return ret;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: ret
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:441:7
|>
441 |> return Ok(output_offset);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: Ok(output_offset)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:476:3
|>
476 |> return Ok(out_size);
|> ^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: Ok(out_size)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: you have declared `#[inline(always)]` on `BrotliLoad16LE`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:106:1
|>
106 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliLoad32LE`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:113:1
|>
113 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliLoad64LE`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:122:1
|>
122 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliFillBitWindow`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:134:1
|>
134 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:160:10
|>
160 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if (BROTLI_ALIGNED_READ == 0 && (n_bits <= 8)) {
src/bit_reader/mod.rs: if (br.bit_pos_ >= 24) {
src/bit_reader/mod.rs: br.val_ >>= 24;
src/bit_reader/mod.rs: br.bit_pos_ ^= 24; // here same as -= 24 because of the if condition
src/bit_reader/mod.rs: br.val_ |= (BrotliLoad32LE(input, br.next_in) << 8) as u64;
src/bit_reader/mod.rs: br.avail_in -= 3;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:169:12
|>
169 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if br.bit_pos_ >= 16 {
src/bit_reader/mod.rs: br.val_ >>= 16;
src/bit_reader/mod.rs: br.bit_pos_ ^= 16; /* here same as -= 16 because of the if condition */
src/bit_reader/mod.rs: br.val_ |= (BrotliLoad16LE(input, br.next_in) as reg_t) << 16;
src/bit_reader/mod.rs: br.avail_in -= BROTLI_SHORT_FILL_BIT_WINDOW_READ;
src/bit_reader/mod.rs: br.next_in += BROTLI_SHORT_FILL_BIT_WINDOW_READ;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: you have declared `#[inline(always)]` on `BrotliFillBitWindowCompileTimeNbits`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:181:1
|>
181 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:211:10
|>
211 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if
src/bit_reader/mod.rs: // BROTLI_ALIGNED_READ == false &&
src/bit_reader/mod.rs: n_bits <= 8 {
src/bit_reader/mod.rs: // !BROTLI_ALIGNED_READ && IS_CONSTANT(n_bits) && (n_bits <= 8)) {
src/bit_reader/mod.rs: if br.bit_pos_ >= 24 {
src/bit_reader/mod.rs: br.val_ >>= 24;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:202:12
|>
202 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if br.bit_pos_ >= 32 {
src/bit_reader/mod.rs: br.val_ >>= 32;
src/bit_reader/mod.rs: br.bit_pos_ ^= 32; /* here same as -= 32 because of the if condition */
src/bit_reader/mod.rs: br.val_ |= (BrotliLoad32LE(input, br.next_in) as reg_t) << 32;
src/bit_reader/mod.rs: br.avail_in -= BROTLI_SHORT_FILL_BIT_WINDOW_READ;
src/bit_reader/mod.rs: br.next_in += BROTLI_SHORT_FILL_BIT_WINDOW_READ;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:223:12
|>
223 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if br.bit_pos_ >= 16 {
src/bit_reader/mod.rs: br.val_ >>= 16;
src/bit_reader/mod.rs: br.bit_pos_ ^= 16; /* here same as -= 16 because of the if condition */
src/bit_reader/mod.rs: br.val_ |= (BrotliLoad16LE(input, br.next_in) as reg_t) << 16;
src/bit_reader/mod.rs: br.avail_in -= BROTLI_SHORT_FILL_BIT_WINDOW_READ;
src/bit_reader/mod.rs: br.next_in += BROTLI_SHORT_FILL_BIT_WINDOW_READ;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: you have declared `#[inline(always)]` on `BrotliGetBitsUnmasked`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:260:1
|>
260 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliGet16BitsUnmasked`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:267:1
|>
267 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliDropBits`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:303:1
|>
303 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliTakeBits`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:323:1
|>
323 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliReadBits`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:335:1
|>
335 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: this if statement can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:446:3
|>
446 |> if BrotliGetAvailableBits(br) == 0 {
|> ^
help: try
src/bit_reader/mod.rs: if BrotliGetAvailableBits(br) == 0 && (!BrotliPullByte(br, input)) {
src/bit_reader/mod.rs: return false;
src/bit_reader/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: defining a method called `eq` on this type; consider implementing the `std::cmp::PartialEq` trait or choosing a less ambiguous name, #[warn(should_implement_trait)] on by default
--> src/huffman/mod.rs:33:3
|>
33 |> pub fn eq(&self, other: &Self) -> bool {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#should_implement_trait
warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
--> src/huffman/mod.rs:77:5
|>
77 |> pub fn get_tree_mut<'a>(self :&'a mut Self, index : u32) -> &'a mut [HuffmanCode] {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
--> src/huffman/mod.rs:82:5
|>
82 |> pub fn get_tree<'a>(self :&'a Self, index : u32) -> &'a [HuffmanCode] {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/huffman/mod.rs:84:16
|>
84 |> return & fast_slice!((self.codes)[start;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
--> src/huffman/mod.rs:100:5
|>
100 |> pub fn build_hgroup_cache<'a>(self : &'a Self) -> [&'a [HuffmanCode]; 256] {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
warning: the variable `index` is used as a loop counter. Consider using `for (index, item) in self.htrees.slice().enumerate()` or similar iterators, #[warn(explicit_counter_loop)] on by default
--> src/huffman/mod.rs:103:7
|>
103 |> for htree in self.htrees.slice() {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/huffman/mod.rs:421:5
|>
421 |> let last: u16;
|> ^
help: it is more idiomatic to write
src/huffman/mod.rs: let last = if val.len() > 3 { ($slice)[$index] } else { 65535 };
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: the loop variable `i` is used to index `mval`. Consider using `for (i, item) in mval.iter().enumerate().take(3)` or similar iterators, #[warn(needless_range_loop)] on by default
--> src/huffman/mod.rs:428:5
|>
428 |> for i in 0..3 {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_range_loop
warning: the loop variable `k` is only used to index `mval`. Consider using `for item in mval.iter().take(4).skip(i + 1)` or similar iterators, #[warn(needless_range_loop)] on by default
--> src/huffman/mod.rs:429:7
|>
429 |> for k in i + 1..4 {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_range_loop
warning: this looks like you are swapping elements of `mval` manually, #[warn(manual_swap)] on by default
--> src/huffman/mod.rs:431:11
|>
431 |> let t: u16 = mval[k];
|> ^
help: try
src/huffman/mod.rs: mval.swap(k, i);
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#manual_swap
warning: the loop variable `i` is only used to index `table`. Consider using `for item in table.iter().take(4)` or similar iterators, #[warn(needless_range_loop)] on by default
--> src/huffman/mod.rs:437:5
|>
437 |> for i in 0..4 {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_range_loop
warning: this looks like you are swapping elements of `mval` manually, #[warn(manual_swap)] on by default
--> src/huffman/mod.rs:448:7
|>
448 |> let t: u16 = mval[3];
|> ^
help: try
src/huffman/mod.rs: mval.swap(3, 2);
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#manual_swap
warning: the loop variable `i` is used to index `table`. Consider using `for (i, item) in table.iter().enumerate().take(7)` or similar iterators, #[warn(needless_range_loop)] on by default
--> src/huffman/mod.rs:452:5
|>
452 |> for i in 0..7 {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_range_loop
warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them, #[warn(char_lit_as_u8)] on by default
--> src/transform.rs:722:26
|>
722 |> if (fast!((p)[0]) >= 'a' as u8 && fast!((p)[0]) <= 'z' as u8) {
|> ^^^^^^^^^
help: Consider using a byte literal instead:
b'a'
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#char_lit_as_u8
warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them, #[warn(char_lit_as_u8)] on by default
--> src/transform.rs:722:56
|>
722 |> if (fast!((p)[0]) >= 'a' as u8 && fast!((p)[0]) <= 'z' as u8) {
|> ^^^^^^^^^
help: Consider using a byte literal instead:
b'z'
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#char_lit_as_u8
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/transform.rs:753:5
|>
753 |> let mut skip: i32;
|> ^
help: it is more idiomatic to write
src/transform.rs: let skip = if t < kOmitFirst1 { 0 } else { t as i32 - (kOmitFirst1 - 1) as i32 };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/transform.rs:763:12
|>
763 |> word = &fast!((word)[skip as usize;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:166:26
|>
166 |> fn DecodeMetaBlockLength<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: you have declared `#[inline(always)]` on `DecodeSymbol`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/decode.rs:301:1
|>
301 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `ReadSymbol`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/decode.rs:319:1
|>
319 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:321:71
|>
321 |> return DecodeSymbol(bit_reader::BrotliGet16BitsUnmasked(br, input), &table, br);
|> ^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: The function/method "bit_reader::BrotliGetAvailableBits" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:330:63
|>
330 |> let mut available_bits = bit_reader::BrotliGetAvailableBits(&mut br);
|> ^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:338:51
|>
338 |> let mut val = bit_reader::BrotliGetBitsUnmasked(&br) as u32;
|> ^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:374:33
|>
374 |> *result = DecodeSymbol(val, &table, br);
|> ^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:379:27
|>
379 |> return SafeDecodeSymbol(&table, br, result);
|> ^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:406:3
|>
406 |> let mut result = *value;
|> ^
help: it is more idiomatic to write
src/decode.rs: let result = if *bits > HUFFMAN_TABLE_BITS { ..; ext.value as u32 } else { ..; *value };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:438:29
|>
438 |> fn ReadSimpleHuffmanSymbols<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this function has too many arguments (9/7), #[warn(too_many_arguments)] on by default
--> src/decode.rs:489:1
|>
489 |> fn ProcessSingleCodeLength(code_len: u32,
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#too_many_arguments
warning: this function has too many arguments (12/7), #[warn(too_many_arguments)] on by default
--> src/decode.rs:524:1
|>
524 |> fn ProcessRepeatedCodeLength(code_len: u32,
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#too_many_arguments
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:537:3
|>
537 |> let mut new_len: u32 = 0;
|> ^
help: it is more idiomatic to write
src/decode.rs: let new_len = if (code_len == kCodeLengthRepeatCode) { *prev_code_len } else { 0 };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:581:26
|>
581 |> fn ReadSymbolCodeLengths<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:649:30
|>
649 |> fn SafeReadSymbolCodeLengths<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:718:30
|>
718 |> fn ReadCodeLengthCodeLengths<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: manual implementation of an assign operation, #[warn(assign_op_pattern)] on by default
--> src/decode.rs:757:7
|>
757 |> space = space - (32 >> v);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^
help: replace it with
src/decode.rs: space -= (32 >> v);
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#assign_op_pattern
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:786:20
|>
786 |> fn ReadHuffmanCode<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:863:9
|>
863 |> match opt_table_size {
|> ^
help: try this
src/decode.rs: if let Some(opt_table_size_ref) = opt_table_size { *opt_table_size_ref = table_size }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: The function/method "huffman::BrotliBuildCodeLengthsHuffmanTable" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:880:53
|>
880 |> &mut s.code_length_code_lengths,
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: The function/method "huffman::BrotliBuildCodeLengthsHuffmanTable" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:881:53
|>
881 |> &mut s.code_length_histo);
|> ^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: the variable `i` is used as a loop counter. Consider using `for (i, item) in fast_mut!((s.next_symbol)[0; max_code_length]).iter_mut().enumerate()` or similar iterators, #[warn(explicit_counter_loop)] on by default
--> src/decode.rs:888:9
|>
888 |> for next_symbol_mut in fast_mut!((s.next_symbol)[0; max_code_length]).iter_mut() {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:907:9
|>
907 |> match result {
|> ^
help: try this
src/decode.rs: if let BrotliResult::NeedsMoreInput = result {
src/decode.rs: result = SafeReadSymbolCodeLengths(alphabet_size, s, input)
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:927:9
|>
927 |> match opt_table_size {
|> ^
help: try this
src/decode.rs: if let Some(opt_table_size_ref) = opt_table_size { *opt_table_size_ref = table_size }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:963:27
|>
963 |> if (!SafeReadSymbol(&table, &mut br, &mut index, input)) {
|> ^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: the variable `i` is used as a loop counter. Consider using `for (i, item) in fast_mut!((mtf)[0;(upper_bound as usize + 1usize)]).iter_mut().enumerate()` or similar iterators, #[warn(explicit_counter_loop)] on by default
--> src/decode.rs:1026:3
|>
1026 |> for item in fast_mut!((mtf)[0;(upper_bound as usize + 1usize)]).iter_mut() {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1055:27
|>
1055 |> fn HuffmanTreeGroupDecode<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:1133:3
|>
1133 |> match result {
|> ^
help: try this
src/decode.rs: if let BrotliResult::ResultSuccess = result {
src/decode.rs: s.substate_tree_group = BrotliRunningTreeGroupState::BROTLI_STATE_TREE_GROUP_NONE
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1159:26
|>
1159 |> fn DecodeContextMapInner<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:1240:9
|>
1240 |> let mut rleCodeGoto: bool = false;
|> ^
help: it is more idiomatic to write
src/decode.rs: let rleCodeGoto = if (code != 0xFFFF) { true } else { false };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1315:21
|>
1315 |> fn DecodeContextMap<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:1331:3
|>
1331 |> let mut context_map_arg: AllocU8::AllocatedMemory;
|> ^
help: it is more idiomatic to write
src/decode.rs: let context_map_arg = if is_dist_context_map { ..; mem::replace(&mut s.dist_context_map, AllocU8::AllocatedMemory::default()) } else { ..; mem::replace(&mut s.context_map, AllocU8::AllocatedMemory::default()) };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1461:37
|>
1461 |> fn DecodeCommandBlockSwitchInternal<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1477:29
|>
1477 |> fn DecodeCommandBlockSwitch<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1486:33
|>
1486 |> fn SafeDecodeCommandBlockSwitch<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1498:38
|>
1498 |> fn DecodeDistanceBlockSwitchInternal<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1517:30
|>
1517 |> fn DecodeDistanceBlockSwitch<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1527:34
|>
1527 |> fn SafeDecodeDistanceBlockSwitch<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1537:20
|>
1537 |> fn WriteRingBuffer<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:1547:3
|>
1547 |> let pos: usize;
|> ^
help: it is more idiomatic to write
src/decode.rs: let pos = if s.pos > s.ringbuffer_size { s.ringbuffer_size as usize } else { s.pos as usize };
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1578:34
|>
1578 |> fn CopyUncompressedBlockToOutput<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1636:29
|>
1636 |> fn BrotliAllocateRingBuffer<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this if statement can be collapsed, #[warn(collapsible_if)] on by default
--> src/decode.rs:1653:5
|>
1653 |> if (next_block_header != -1) {
|> ^
help: try
src/decode.rs: if ((next_block_header != -1)) && ((next_block_header & 3) == 3) {
src/decode.rs: // ISLAST and ISEMPTY
src/decode.rs: is_last = 1;
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1695:25
|>
1695 |> pub fn ReadContextModes<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1723:35
|>
1723 |> pub fn TakeDistanceFromRingBuffer<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1771:29
|>
1771 |> pub fn ReadDistanceInternal<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: The function/method "bit_reader::BrotliBitReaderRestoreState" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:1823:62
|>
1823 |> bit_reader::BrotliBitReaderRestoreState(&mut s.br, &mut memento);
|> ^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1841:28
|>
1841 |> pub fn ReadCommandInternal<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/decode.rs:1882:10
|>
1882 |> } else {
|> ^
help: try
src/decode.rs: } else if (!SafeReadBits(&mut s.br,
src/decode.rs: v.insert_len_extra_bits as u32,
src/decode.rs: &mut insert_len_extra,
src/decode.rs: input)) ||
src/decode.rs: (!SafeReadBits(&mut s.br,
src/decode.rs: v.copy_len_extra_bits as u32,
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: you have declared `#[inline(always)]` on `memmove16`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/decode.rs:1916:1
|>
1916 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: The function/method "clone_from_slice" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:1941:80
|>
1941 |> fast_mut!((data)[off_dst as usize ; off_dst as usize + 16]).clone_from_slice(&mut local_array);
|> ^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: the function has a cyclomatic complexity of 46, #[warn(cyclomatic_complexity)] on by default
--> src/decode.rs:1961:1
|>
1961 |> fn ProcessCommandsInternal,
|> ^
help: you could split it up into multiple smaller functions
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#cyclomatic_complexity
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:2104:22
|>
2104 |> hc = &fast!((literal_hgroup)[i as usize]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:2334:20
|>
2334 |> fn ProcessCommands<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:2344:24
|>
2344 |> fn SafeProcessCommands<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:2357:31
|>
2357 |> pub fn BrotliDecompressStream<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: the function has a cyclomatic complexity of 55, #[warn(cyclomatic_complexity)] on by default
--> src/decode.rs:2357:1
|>
2357 |> pub fn BrotliDecompressStream<'a,
|> ^
help: you could split it up into multiple smaller functions
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#cyclomatic_complexity
warning: this function has too many arguments (8/7), #[warn(too_many_arguments)] on by default
--> src/decode.rs:2357:1
|>
2357 |> pub fn BrotliDecompressStream<'a,
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#too_many_arguments
warning: using `clone` on a `Copy` type, #[warn(clone_on_copy)] on by default
--> src/decode.rs:2373:35
|>
2373 |> let mut saved_buffer: [u8; 8] = s.buffer.clone();
|> ^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#clone_on_copy
warning: this if statement can be collapsed, #[warn(collapsible_if)] on by default
--> src/decode.rs:2532:11
|>
2532 |> if (s.is_metadata != 0 || s.is_uncompressed != 0) {
|> ^
help: try
src/decode.rs: if ((s.is_metadata != 0 || s.is_uncompressed != 0)) && ((!bit_reader::BrotliJumpToByteBoundary(&mut s.br))) {
src/decode.rs: result = BROTLI_FAILURE();
src/decode.rs: break;
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this if statement can be collapsed, #[warn(collapsible_if)] on by default
--> src/decode.rs:2546:11
|>
2546 |> if (s.ringbuffer.slice().len() == 0) {
|> ^
help: try
src/decode.rs: if (s.ringbuffer.slice().len() == 0) && ((!BrotliAllocateRingBuffer(&mut s, local_input))) {
src/decode.rs: result = BROTLI_FAILURE();
src/decode.rs: break;
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:2586:11
|>
2586 |> match result {
|> ^
help: try this
src/decode.rs: if let BrotliResult::ResultSuccess = result {
src/decode.rs: s.state = BrotliRunningState::BROTLI_STATE_METABLOCK_DONE
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: the variable `j` is used as a loop counter. Consider using `for (j, item) in fast_slice!((s.context_map)[0 ; bound]).iter().enumerate()` or similar iterators, #[warn(explicit_counter_loop)] on by default
--> src/decode.rs:2734:11
|>
2734 |> for context_map_item in fast_slice!((s.context_map)[0 ; bound]).iter() {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:2794:33
|>
2794 |> s.context_lookup1 = &fast!((kContextLookup)[index1;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:2796:33
|>
2796 |> s.context_lookup2 = &fast!((kContextLookup)[index2;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:2808:11
|>
2808 |> match result {
|> ^
help: try this
src/decode.rs: if let BrotliResult::NeedsMoreInput = result { result = SafeProcessCommands(s, local_input) }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: this function has too many arguments (8/7), #[warn(too_many_arguments)] on by default
--> src/lib.rs:124:1
|>
124 |> pub fn BrotliDecompressCustomIo ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#too_many_arguments
warning: very complex type used. Consider factoring parts into `type` definitions, #[warn(type_complexity)] on by default
--> src/lib.rs:266:34
|>
266 |> pub struct Decompressor(DecompressorCustomAlloc ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#type_complexity
warning: equality checks against false can be replaced by a negation, #[warn(bool_comparison)] on by default
--> src/lib.rs:403:40
|>
403 |> while avail_out == buf.len() && (needs_input == false || self.input_eof == false) {
|> ^^^^^^^^^^^^^^^^^^^^
help: try simplifying it as shown:
src/lib.rs: while avail_out == buf.len() && (!needs_input || self.input_eof == false) {
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#bool_comparison
warning: equality checks against false can be replaced by a negation, #[warn(bool_comparison)] on by default
--> src/lib.rs:403:64
|>
403 |> while avail_out == buf.len() && (needs_input == false || self.input_eof == false) {
|> ^^^^^^^^^^^^^^^^^^^^^^^
help: try simplifying it as shown:
src/lib.rs: while avail_out == buf.len() && (needs_input == false || !self.input_eof) {
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#bool_comparison
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/lib.rs:452:9
|>
452 |> match e.kind() {
|> ^
help: try this
src/lib.rs: if let io::ErrorKind::Interrupted = e.kind() { continue }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/lib.rs:464:15
|>
464 |> match e.kind() {
|> ^
help: try this
src/lib.rs: if let io::ErrorKind::Interrupted = e.kind() { continue }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
Compiling brotli v1.0.6 (file:///Users/pascal/Projekte/tools/rust-brotli)
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:45:5
|>
45 |> return BrotliBitReader {
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: BrotliBitReader {
src/bit_reader/mod.rs: val_: 0,
src/bit_reader/mod.rs: bit_pos_: 0,
src/bit_reader/mod.rs: next_in: 0,
src/bit_reader/mod.rs: avail_in: 0,
src/bit_reader/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:63:5
|>
63 |> return BrotliBitReaderState {
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: BrotliBitReaderState {
src/bit_reader/mod.rs: val_: 0,
src/bit_reader/mod.rs: bit_pos_: 0,
src/bit_reader/mod.rs: next_in: 0,
src/bit_reader/mod.rs: avail_in: 0,
src/bit_reader/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:74:3
|>
74 |> return BrotliBitReaderState {
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: BrotliBitReaderState {
src/bit_reader/mod.rs: val_: from.val_,
src/bit_reader/mod.rs: bit_pos_: from.bit_pos_,
src/bit_reader/mod.rs: next_in: from.next_in,
src/bit_reader/mod.rs: avail_in: from.avail_in,
src/bit_reader/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:90:3
|>
90 |> return ((::core::mem::size_of::() as u32) << 3) - br.bit_pos_;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: ((::core::mem::size_of::() as u32) << 3) - br.bit_pos_
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:96:3
|>
96 |> return br.avail_in + (BrotliGetAvailableBits(br) >> 3);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: br.avail_in + (BrotliGetAvailableBits(br) >> 3)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:102:3
|>
102 |> return br.avail_in >= num;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: br.avail_in >= num
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:109:3
|>
109 |> return (fast!((input)[next_in]) as u16) | ((fast!((input)[next_in + 1]) as u16) << 8);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: (fast!((input)[next_in]) as u16) | ((fast!((input)[next_in + 1]) as u16) << 8)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:118:3
|>
118 |> return (four_byte[0] as u32) | ((four_byte[1] as u32) << 8) | ((four_byte[2] as u32) << 16) |
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: (four_byte[0] as u32) | ((four_byte[1] as u32) << 8) | ((four_byte[2] as u32) << 16) |
src/bit_reader/mod.rs: ((four_byte[3] as u32) << 24)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:127:3
|>
127 |> return (eight_byte[0] as u64) | ((eight_byte[1] as u64) << 8) | ((eight_byte[2] as u64) << 16) |
|> ^
help: remove `return` as shown:
src/bit_reader/mod.rs: (eight_byte[0] as u64) | ((eight_byte[1] as u64) << 8) | ((eight_byte[2] as u64) << 16) |
src/bit_reader/mod.rs: ((eight_byte[3] as u64) << 24) |
src/bit_reader/mod.rs: ((eight_byte[4] as u64) << 32) | ((eight_byte[5] as u64) << 40) |
src/bit_reader/mod.rs: ((eight_byte[6] as u64) << 48) | ((eight_byte[7] as u64) << 56)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:255:3
|>
255 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:262:3
|>
262 |> return br.val_ >> br.bit_pos_;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: br.val_ >> br.bit_pos_
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:270:3
|>
270 |> return (BrotliGetBitsUnmasked(br) & (0xffffffffu32 as reg_t)) as u32;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: (BrotliGetBitsUnmasked(br) & (0xffffffffu32 as reg_t)) as u32
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:276:3
|>
276 |> return (BrotliGetBitsUnmasked(br) as u32) & BitMask(n_bits);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: (BrotliGetBitsUnmasked(br) as u32) & BitMask(n_bits)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:283:3
|>
283 |> return (BrotliGetBitsUnmasked(br) as u32) & BitMask(n_bits);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: (BrotliGetBitsUnmasked(br) as u32) & BitMask(n_bits)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:299:3
|>
299 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:341:5
|>
341 |> return val;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: val
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:349:5
|>
349 |> return low_val | (high_val << 16);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: low_val | (high_val << 16)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:361:5
|>
361 |> return val;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: val
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:369:5
|>
369 |> return low_val | (high_val << 16);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: low_val | (high_val << 16)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:386:3
|>
386 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:397:3
|>
397 |> return pad_bits == 0;
|> ^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: pad_bits == 0
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:414:3
|>
414 |> return -1;
|> ^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: -1
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bit_reader/mod.rs:459:3
|>
459 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/bit_reader/mod.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:34:5
|>
34 |> return self.value == other.value && self.bits == other.bits;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: self.value == other.value && self.bits == other.bits
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:40:5
|>
40 |> return HuffmanCode {
|> ^
help: remove `return` as shown:
src/huffman/mod.rs: HuffmanCode {
src/huffman/mod.rs: value: 0,
src/huffman/mod.rs: bits: 0,
src/huffman/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:79:9
|>
79 |> return fast_mut!((self.codes.slice_mut())[start;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: &mut $slice[$start..]
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:84:9
|>
84 |> return & fast_slice!((self.codes)[start;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: & fast_slice!((self.codes)[start;])
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:107:7
|>
107 |> return ret;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: ret
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:114:9
|>
114 |> return HuffmanTreeGroup:: {
|> ^
help: remove `return` as shown:
src/huffman/mod.rs: HuffmanTreeGroup:: {
src/huffman/mod.rs: htrees : AllocU32::AllocatedMemory::default(),
src/huffman/mod.rs: codes : AllocHC::AllocatedMemory::default(),
src/huffman/mod.rs: alphabet_size : 0,
src/huffman/mod.rs: num_htrees : 0,
src/huffman/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:153:3
|>
153 |> return fast!((kReverseBits)[num as usize]) as u32;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: fast!((kReverseBits)[num as usize]) as u32
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:185:3
|>
185 |> return len - root_bits;
|> ^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: len - root_bits
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:378:3
|>
378 |> return total_size as u32;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: total_size as u32
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/huffman/mod.rs:472:3
|>
472 |> return goal_size;
|> ^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/huffman/mod.rs: goal_size
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:336:9
|>
336 |> return retval;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: retval
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:400:17
|>
400 |> return BrotliGetAvailableBits(&self.br) == 0,
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: BrotliGetAvailableBits(&self.br) == 0,
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:401:18
|>
401 |> _ => return false,
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: _ => false,
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:407:54
|>
407 |> BrotliRunningState::BROTLI_STATE_DONE => return true,
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: BrotliRunningState::BROTLI_STATE_DONE => true,
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/state.rs:408:18
|>
408 |> _ => return false,
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/state.rs: _ => false,
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/transform.rs:734:3
|>
734 |> return 3;
|> ^^^^^^^^^
help: remove `return` as shown:
src/transform.rs: 3
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/transform.rs:794:5
|>
794 |> return idx;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/transform.rs: idx
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:74:3
|>
74 |> return BrotliResult::ResultFailure;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultFailure
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:110:3
|>
110 |> return 17;
|> ^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: 17
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:314:3
|>
314 |> return table_element.value as u32;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: table_element.value as u32
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:321:3
|>
321 |> return DecodeSymbol(bit_reader::BrotliGet16BitsUnmasked(br, input), &table, br);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: DecodeSymbol(bit_reader::BrotliGet16BitsUnmasked(br, input), &table, br)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:364:3
|>
364 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:379:3
|>
379 |> return SafeDecodeSymbol(&table, br, result);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: SafeDecodeSymbol(&table, br, result)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:421:3
|>
421 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:430:3
|>
430 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:479:3
|>
479 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:646:3
|>
646 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:713:3
|>
713 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:770:3
|>
770 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:947:3
|>
947 |> return fast_ref!((prefix::kBlockLengthPrefixCode)[code as usize]).offset as u32 +
|> ^
help: remove `return` as shown:
src/decode.rs: fast_ref!((prefix::kBlockLengthPrefixCode)[code as usize]).offset as u32 +
src/decode.rs: bit_reader::BrotliReadBits(br, nbits, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:966:7
|>
966 |> return (true, index);
|> ^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: (true, index)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:968:10
|>
968 |> _ => return (true, block_length_index),
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: _ => (true, block_length_index),
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:992:3
|>
992 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1139:3
|>
1139 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1354:3
|>
1354 |> return retval;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: retval
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1410:3
|>
1410 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1439:3
|>
1439 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1473:3
|>
1473 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1493:3
|>
1493 |> return DecodeCommandBlockSwitchInternal(true, s, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: DecodeCommandBlockSwitchInternal(true, s, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1513:3
|>
1513 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1534:3
|>
1534 |> return DecodeDistanceBlockSwitchInternal(true, s, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: DecodeDistanceBlockSwitchInternal(true, s, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1575:3
|>
1575 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1691:3
|>
1691 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1720:3
|>
1720 |> return BrotliResult::ResultSuccess;
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: BrotliResult::ResultSuccess
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1763:5
|>
1763 |> return bit_reader::BrotliSafeReadBits(br, n_bits, val, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: bit_reader::BrotliSafeReadBits(br, n_bits, val, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1766:5
|>
1766 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1837:3
|>
1837 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1898:3
|>
1898 |> return true;
|> ^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: true
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1906:3
|>
1906 |> return bit_reader::BrotliWarmupBitReader(br, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: bit_reader::BrotliWarmupBitReader(br, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:1913:3
|>
1913 |> return bit_reader::BrotliCheckInputAmount(br, num);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: bit_reader::BrotliCheckInputAmount(br, num)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:2331:3
|>
2331 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:2341:3
|>
2341 |> return ProcessCommandsInternal(false, s, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: ProcessCommandsInternal(false, s, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:2351:3
|>
2351 |> return ProcessCommandsInternal(true, s, input);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: ProcessCommandsInternal(true, s, input)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/decode.rs:2908:3
|>
2908 |> return result;
|> ^^^^^^^^^^^^^^
help: remove `return` as shown:
src/decode.rs: result
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:67:3
|>
67 |> return BrotliDecompressCustomAlloc(r,
|> ^
help: remove `return` as shown:
src/lib.rs: BrotliDecompressCustomAlloc(r,
src/lib.rs: w,
src/lib.rs: &mut input_buffer[..],
src/lib.rs: &mut output_buffer[..],
src/lib.rs: HeapAlloc:: { default_value: 0 },
src/lib.rs: HeapAlloc:: { default_value: 0 },
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:114:3
|>
114 |> return BrotliDecompressCustomIo(&mut IoReaderWrapper::(r),
|> ^
help: remove `return` as shown:
src/lib.rs: BrotliDecompressCustomIo(&mut IoReaderWrapper::(r),
src/lib.rs: &mut IoWriterWrapper::(w),
src/lib.rs: input_buffer,
src/lib.rs: output_buffer,
src/lib.rs: alloc_u8,
src/lib.rs: alloc_u32,
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:238:9
|>
238 |> return DecompressorCustomAlloc::(
|> ^
help: remove `return` as shown:
src/lib.rs: DecompressorCustomAlloc::(
src/lib.rs: DecompressorCustomIo::,
src/lib.rs: BufferType,
src/lib.rs: AllocU8, AllocU32, AllocHC>::new(IntoIoReader::(r),
src/lib.rs: buffer,
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:260:8
|>
260 |> return self.0.read(buf);
|> ^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: self.0.read(buf)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:281:5
|>
281 |> return Decompressor::(DecompressorCustomAlloc:: ^
help: remove `return` as shown:
src/lib.rs: Decompressor::(DecompressorCustomAlloc::
src/lib.rs: as Allocator>::AllocatedMemory,
src/lib.rs: HeapAlloc,
src/lib.rs: HeapAlloc,
src/lib.rs: HeapAlloc >::new(r,
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:325:5
|>
325 |> return self.0.read(buf);
|> ^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: self.0.read(buf)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:372:9
|>
372 |> return ret;
|> ^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: ret
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:441:7
|>
441 |> return Ok(output_offset);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: Ok(output_offset)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/lib.rs:476:3
|>
476 |> return Ok(out_size);
|> ^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/lib.rs: Ok(out_size)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: you have declared `#[inline(always)]` on `BrotliLoad16LE`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:106:1
|>
106 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliLoad32LE`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:113:1
|>
113 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliLoad64LE`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:122:1
|>
122 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliFillBitWindow`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:134:1
|>
134 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:160:10
|>
160 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if (BROTLI_ALIGNED_READ == 0 && (n_bits <= 8)) {
src/bit_reader/mod.rs: if (br.bit_pos_ >= 24) {
src/bit_reader/mod.rs: br.val_ >>= 24;
src/bit_reader/mod.rs: br.bit_pos_ ^= 24; // here same as -= 24 because of the if condition
src/bit_reader/mod.rs: br.val_ |= (BrotliLoad32LE(input, br.next_in) << 8) as u64;
src/bit_reader/mod.rs: br.avail_in -= 3;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:169:12
|>
169 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if br.bit_pos_ >= 16 {
src/bit_reader/mod.rs: br.val_ >>= 16;
src/bit_reader/mod.rs: br.bit_pos_ ^= 16; /* here same as -= 16 because of the if condition */
src/bit_reader/mod.rs: br.val_ |= (BrotliLoad16LE(input, br.next_in) as reg_t) << 16;
src/bit_reader/mod.rs: br.avail_in -= BROTLI_SHORT_FILL_BIT_WINDOW_READ;
src/bit_reader/mod.rs: br.next_in += BROTLI_SHORT_FILL_BIT_WINDOW_READ;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: you have declared `#[inline(always)]` on `BrotliFillBitWindowCompileTimeNbits`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:181:1
|>
181 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:211:10
|>
211 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if
src/bit_reader/mod.rs: // BROTLI_ALIGNED_READ == false &&
src/bit_reader/mod.rs: n_bits <= 8 {
src/bit_reader/mod.rs: // !BROTLI_ALIGNED_READ && IS_CONSTANT(n_bits) && (n_bits <= 8)) {
src/bit_reader/mod.rs: if br.bit_pos_ >= 24 {
src/bit_reader/mod.rs: br.val_ >>= 24;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:202:12
|>
202 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if br.bit_pos_ >= 32 {
src/bit_reader/mod.rs: br.val_ >>= 32;
src/bit_reader/mod.rs: br.bit_pos_ ^= 32; /* here same as -= 32 because of the if condition */
src/bit_reader/mod.rs: br.val_ |= (BrotliLoad32LE(input, br.next_in) as reg_t) << 32;
src/bit_reader/mod.rs: br.avail_in -= BROTLI_SHORT_FILL_BIT_WINDOW_READ;
src/bit_reader/mod.rs: br.next_in += BROTLI_SHORT_FILL_BIT_WINDOW_READ;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:223:12
|>
223 |> } else {
|> ^
help: try
src/bit_reader/mod.rs: } else if br.bit_pos_ >= 16 {
src/bit_reader/mod.rs: br.val_ >>= 16;
src/bit_reader/mod.rs: br.bit_pos_ ^= 16; /* here same as -= 16 because of the if condition */
src/bit_reader/mod.rs: br.val_ |= (BrotliLoad16LE(input, br.next_in) as reg_t) << 16;
src/bit_reader/mod.rs: br.avail_in -= BROTLI_SHORT_FILL_BIT_WINDOW_READ;
src/bit_reader/mod.rs: br.next_in += BROTLI_SHORT_FILL_BIT_WINDOW_READ;
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: you have declared `#[inline(always)]` on `BrotliGetBitsUnmasked`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:260:1
|>
260 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliGet16BitsUnmasked`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:267:1
|>
267 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliDropBits`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:303:1
|>
303 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliTakeBits`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:323:1
|>
323 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `BrotliReadBits`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/bit_reader/mod.rs:335:1
|>
335 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: this if statement can be collapsed, #[warn(collapsible_if)] on by default
--> src/bit_reader/mod.rs:446:3
|>
446 |> if BrotliGetAvailableBits(br) == 0 {
|> ^
help: try
src/bit_reader/mod.rs: if BrotliGetAvailableBits(br) == 0 && (!BrotliPullByte(br, input)) {
src/bit_reader/mod.rs: return false;
src/bit_reader/mod.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: defining a method called `eq` on this type; consider implementing the `std::cmp::PartialEq` trait or choosing a less ambiguous name, #[warn(should_implement_trait)] on by default
--> src/huffman/mod.rs:33:3
|>
33 |> pub fn eq(&self, other: &Self) -> bool {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#should_implement_trait
warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
--> src/huffman/mod.rs:77:5
|>
77 |> pub fn get_tree_mut<'a>(self :&'a mut Self, index : u32) -> &'a mut [HuffmanCode] {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
--> src/huffman/mod.rs:82:5
|>
82 |> pub fn get_tree<'a>(self :&'a Self, index : u32) -> &'a [HuffmanCode] {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/huffman/mod.rs:84:16
|>
84 |> return & fast_slice!((self.codes)[start;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
--> src/huffman/mod.rs:100:5
|>
100 |> pub fn build_hgroup_cache<'a>(self : &'a Self) -> [&'a [HuffmanCode]; 256] {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
warning: the variable `index` is used as a loop counter. Consider using `for (index, item) in self.htrees.slice().enumerate()` or similar iterators, #[warn(explicit_counter_loop)] on by default
--> src/huffman/mod.rs:103:7
|>
103 |> for htree in self.htrees.slice() {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/huffman/mod.rs:421:5
|>
421 |> let last: u16;
|> ^
help: it is more idiomatic to write
src/huffman/mod.rs: let last = if val.len() > 3 { ($slice)[$index] } else { 65535 };
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: the loop variable `i` is used to index `mval`. Consider using `for (i, item) in mval.iter().enumerate().take(3)` or similar iterators, #[warn(needless_range_loop)] on by default
--> src/huffman/mod.rs:428:5
|>
428 |> for i in 0..3 {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_range_loop
warning: the loop variable `k` is only used to index `mval`. Consider using `for item in mval.iter().take(4).skip(i + 1)` or similar iterators, #[warn(needless_range_loop)] on by default
--> src/huffman/mod.rs:429:7
|>
429 |> for k in i + 1..4 {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_range_loop
warning: this looks like you are swapping elements of `mval` manually, #[warn(manual_swap)] on by default
--> src/huffman/mod.rs:431:11
|>
431 |> let t: u16 = mval[k];
|> ^
help: try
src/huffman/mod.rs: mval.swap(k, i);
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#manual_swap
warning: the loop variable `i` is only used to index `table`. Consider using `for item in table.iter().take(4)` or similar iterators, #[warn(needless_range_loop)] on by default
--> src/huffman/mod.rs:437:5
|>
437 |> for i in 0..4 {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_range_loop
warning: this looks like you are swapping elements of `mval` manually, #[warn(manual_swap)] on by default
--> src/huffman/mod.rs:448:7
|>
448 |> let t: u16 = mval[3];
|> ^
help: try
src/huffman/mod.rs: mval.swap(3, 2);
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#manual_swap
warning: the loop variable `i` is used to index `table`. Consider using `for (i, item) in table.iter().enumerate().take(7)` or similar iterators, #[warn(needless_range_loop)] on by default
--> src/huffman/mod.rs:452:5
|>
452 |> for i in 0..7 {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_range_loop
warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them, #[warn(char_lit_as_u8)] on by default
--> src/transform.rs:722:26
|>
722 |> if (fast!((p)[0]) >= 'a' as u8 && fast!((p)[0]) <= 'z' as u8) {
|> ^^^^^^^^^
help: Consider using a byte literal instead:
b'a'
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#char_lit_as_u8
warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them, #[warn(char_lit_as_u8)] on by default
--> src/transform.rs:722:56
|>
722 |> if (fast!((p)[0]) >= 'a' as u8 && fast!((p)[0]) <= 'z' as u8) {
|> ^^^^^^^^^
help: Consider using a byte literal instead:
b'z'
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#char_lit_as_u8
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/transform.rs:753:5
|>
753 |> let mut skip: i32;
|> ^
help: it is more idiomatic to write
src/transform.rs: let skip = if t < kOmitFirst1 { 0 } else { t as i32 - (kOmitFirst1 - 1) as i32 };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/transform.rs:763:12
|>
763 |> word = &fast!((word)[skip as usize;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:166:26
|>
166 |> fn DecodeMetaBlockLength<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: you have declared `#[inline(always)]` on `DecodeSymbol`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/decode.rs:301:1
|>
301 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: you have declared `#[inline(always)]` on `ReadSymbol`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/decode.rs:319:1
|>
319 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:321:71
|>
321 |> return DecodeSymbol(bit_reader::BrotliGet16BitsUnmasked(br, input), &table, br);
|> ^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: The function/method "bit_reader::BrotliGetAvailableBits" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:330:63
|>
330 |> let mut available_bits = bit_reader::BrotliGetAvailableBits(&mut br);
|> ^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:338:51
|>
338 |> let mut val = bit_reader::BrotliGetBitsUnmasked(&br) as u32;
|> ^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:374:33
|>
374 |> *result = DecodeSymbol(val, &table, br);
|> ^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:379:27
|>
379 |> return SafeDecodeSymbol(&table, br, result);
|> ^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:406:3
|>
406 |> let mut result = *value;
|> ^
help: it is more idiomatic to write
src/decode.rs: let result = if *bits > HUFFMAN_TABLE_BITS { ..; ext.value as u32 } else { ..; *value };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:438:29
|>
438 |> fn ReadSimpleHuffmanSymbols<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this function has too many arguments (9/7), #[warn(too_many_arguments)] on by default
--> src/decode.rs:489:1
|>
489 |> fn ProcessSingleCodeLength(code_len: u32,
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#too_many_arguments
warning: this function has too many arguments (12/7), #[warn(too_many_arguments)] on by default
--> src/decode.rs:524:1
|>
524 |> fn ProcessRepeatedCodeLength(code_len: u32,
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#too_many_arguments
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:537:3
|>
537 |> let mut new_len: u32 = 0;
|> ^
help: it is more idiomatic to write
src/decode.rs: let new_len = if (code_len == kCodeLengthRepeatCode) { *prev_code_len } else { 0 };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:581:26
|>
581 |> fn ReadSymbolCodeLengths<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:649:30
|>
649 |> fn SafeReadSymbolCodeLengths<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:718:30
|>
718 |> fn ReadCodeLengthCodeLengths<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: manual implementation of an assign operation, #[warn(assign_op_pattern)] on by default
--> src/decode.rs:757:7
|>
757 |> space = space - (32 >> v);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^
help: replace it with
src/decode.rs: space -= (32 >> v);
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#assign_op_pattern
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:786:20
|>
786 |> fn ReadHuffmanCode<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:863:9
|>
863 |> match opt_table_size {
|> ^
help: try this
src/decode.rs: if let Some(opt_table_size_ref) = opt_table_size { *opt_table_size_ref = table_size }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: The function/method "huffman::BrotliBuildCodeLengthsHuffmanTable" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:880:53
|>
880 |> &mut s.code_length_code_lengths,
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: The function/method "huffman::BrotliBuildCodeLengthsHuffmanTable" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:881:53
|>
881 |> &mut s.code_length_histo);
|> ^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: the variable `i` is used as a loop counter. Consider using `for (i, item) in fast_mut!((s.next_symbol)[0; max_code_length]).iter_mut().enumerate()` or similar iterators, #[warn(explicit_counter_loop)] on by default
--> src/decode.rs:888:9
|>
888 |> for next_symbol_mut in fast_mut!((s.next_symbol)[0; max_code_length]).iter_mut() {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:907:9
|>
907 |> match result {
|> ^
help: try this
src/decode.rs: if let BrotliResult::NeedsMoreInput = result {
src/decode.rs: result = SafeReadSymbolCodeLengths(alphabet_size, s, input)
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:927:9
|>
927 |> match opt_table_size {
|> ^
help: try this
src/decode.rs: if let Some(opt_table_size_ref) = opt_table_size { *opt_table_size_ref = table_size }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:963:27
|>
963 |> if (!SafeReadSymbol(&table, &mut br, &mut index, input)) {
|> ^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: the variable `i` is used as a loop counter. Consider using `for (i, item) in fast_mut!((mtf)[0;(upper_bound as usize + 1usize)]).iter_mut().enumerate()` or similar iterators, #[warn(explicit_counter_loop)] on by default
--> src/decode.rs:1026:3
|>
1026 |> for item in fast_mut!((mtf)[0;(upper_bound as usize + 1usize)]).iter_mut() {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1055:27
|>
1055 |> fn HuffmanTreeGroupDecode<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:1133:3
|>
1133 |> match result {
|> ^
help: try this
src/decode.rs: if let BrotliResult::ResultSuccess = result {
src/decode.rs: s.substate_tree_group = BrotliRunningTreeGroupState::BROTLI_STATE_TREE_GROUP_NONE
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1159:26
|>
1159 |> fn DecodeContextMapInner<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:1240:9
|>
1240 |> let mut rleCodeGoto: bool = false;
|> ^
help: it is more idiomatic to write
src/decode.rs: let rleCodeGoto = if (code != 0xFFFF) { true } else { false };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1315:21
|>
1315 |> fn DecodeContextMap<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:1331:3
|>
1331 |> let mut context_map_arg: AllocU8::AllocatedMemory;
|> ^
help: it is more idiomatic to write
src/decode.rs: let context_map_arg = if is_dist_context_map { ..; mem::replace(&mut s.dist_context_map, AllocU8::AllocatedMemory::default()) } else { ..; mem::replace(&mut s.context_map, AllocU8::AllocatedMemory::default()) };
note: you might not need `mut` at all
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1461:37
|>
1461 |> fn DecodeCommandBlockSwitchInternal<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1477:29
|>
1477 |> fn DecodeCommandBlockSwitch<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1486:33
|>
1486 |> fn SafeDecodeCommandBlockSwitch<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1498:38
|>
1498 |> fn DecodeDistanceBlockSwitchInternal<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1517:30
|>
1517 |> fn DecodeDistanceBlockSwitch<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1527:34
|>
1527 |> fn SafeDecodeDistanceBlockSwitch<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1537:20
|>
1537 |> fn WriteRingBuffer<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: `if _ { .. } else { .. }` is an expression, #[warn(useless_let_if_seq)] on by default
--> src/decode.rs:1547:3
|>
1547 |> let pos: usize;
|> ^
help: it is more idiomatic to write
src/decode.rs: let pos = if s.pos > s.ringbuffer_size { s.ringbuffer_size as usize } else { s.pos as usize };
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_let_if_seq
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1578:34
|>
1578 |> fn CopyUncompressedBlockToOutput<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1636:29
|>
1636 |> fn BrotliAllocateRingBuffer<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this if statement can be collapsed, #[warn(collapsible_if)] on by default
--> src/decode.rs:1653:5
|>
1653 |> if (next_block_header != -1) {
|> ^
help: try
src/decode.rs: if ((next_block_header != -1)) && ((next_block_header & 3) == 3) {
src/decode.rs: // ISLAST and ISEMPTY
src/decode.rs: is_last = 1;
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1695:25
|>
1695 |> pub fn ReadContextModes<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1723:35
|>
1723 |> pub fn TakeDistanceFromRingBuffer<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1771:29
|>
1771 |> pub fn ReadDistanceInternal<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: The function/method "bit_reader::BrotliBitReaderRestoreState" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:1823:62
|>
1823 |> bit_reader::BrotliBitReaderRestoreState(&mut s.br, &mut memento);
|> ^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:1841:28
|>
1841 |> pub fn ReadCommandInternal<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
--> src/decode.rs:1882:10
|>
1882 |> } else {
|> ^
help: try
src/decode.rs: } else if (!SafeReadBits(&mut s.br,
src/decode.rs: v.insert_len_extra_bits as u32,
src/decode.rs: &mut insert_len_extra,
src/decode.rs: input)) ||
src/decode.rs: (!SafeReadBits(&mut s.br,
src/decode.rs: v.copy_len_extra_bits as u32,
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: you have declared `#[inline(always)]` on `memmove16`. This is usually a bad idea, #[warn(inline_always)] on by default
--> src/decode.rs:1916:1
|>
1916 |> #[inline(always)]
|> ^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
warning: The function/method "clone_from_slice" doesn't need a mutable reference, #[warn(unnecessary_mut_passed)] on by default
--> src/decode.rs:1941:80
|>
1941 |> fast_mut!((data)[off_dst as usize ; off_dst as usize + 16]).clone_from_slice(&mut local_array);
|> ^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unnecessary_mut_passed
warning: the function has a cyclomatic complexity of 46, #[warn(cyclomatic_complexity)] on by default
--> src/decode.rs:1961:1
|>
1961 |> fn ProcessCommandsInternal,
|> ^
help: you could split it up into multiple smaller functions
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#cyclomatic_complexity
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:2104:22
|>
2104 |> hc = &fast!((literal_hgroup)[i as usize]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:2334:20
|>
2334 |> fn ProcessCommands<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:2344:24
|>
2344 |> fn SafeProcessCommands<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: this lifetime isn't used in the function definition, #[warn(unused_lifetimes)] on by default
--> src/decode.rs:2357:31
|>
2357 |> pub fn BrotliDecompressStream<'a,
|> ^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#unused_lifetimes
warning: the function has a cyclomatic complexity of 55, #[warn(cyclomatic_complexity)] on by default
--> src/decode.rs:2357:1
|>
2357 |> pub fn BrotliDecompressStream<'a,
|> ^
help: you could split it up into multiple smaller functions
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#cyclomatic_complexity
warning: this function has too many arguments (8/7), #[warn(too_many_arguments)] on by default
--> src/decode.rs:2357:1
|>
2357 |> pub fn BrotliDecompressStream<'a,
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#too_many_arguments
warning: using `clone` on a `Copy` type, #[warn(clone_on_copy)] on by default
--> src/decode.rs:2373:35
|>
2373 |> let mut saved_buffer: [u8; 8] = s.buffer.clone();
|> ^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#clone_on_copy
warning: this if statement can be collapsed, #[warn(collapsible_if)] on by default
--> src/decode.rs:2532:11
|>
2532 |> if (s.is_metadata != 0 || s.is_uncompressed != 0) {
|> ^
help: try
src/decode.rs: if ((s.is_metadata != 0 || s.is_uncompressed != 0)) && ((!bit_reader::BrotliJumpToByteBoundary(&mut s.br))) {
src/decode.rs: result = BROTLI_FAILURE();
src/decode.rs: break;
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: this if statement can be collapsed, #[warn(collapsible_if)] on by default
--> src/decode.rs:2546:11
|>
2546 |> if (s.ringbuffer.slice().len() == 0) {
|> ^
help: try
src/decode.rs: if (s.ringbuffer.slice().len() == 0) && ((!BrotliAllocateRingBuffer(&mut s, local_input))) {
src/decode.rs: result = BROTLI_FAILURE();
src/decode.rs: break;
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:2586:11
|>
2586 |> match result {
|> ^
help: try this
src/decode.rs: if let BrotliResult::ResultSuccess = result {
src/decode.rs: s.state = BrotliRunningState::BROTLI_STATE_METABLOCK_DONE
src/decode.rs: }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: the variable `j` is used as a loop counter. Consider using `for (j, item) in fast_slice!((s.context_map)[0 ; bound]).iter().enumerate()` or similar iterators, #[warn(explicit_counter_loop)] on by default
--> src/decode.rs:2734:11
|>
2734 |> for context_map_item in fast_slice!((s.context_map)[0 ; bound]).iter() {
|> ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_counter_loop
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:2794:33
|>
2794 |> s.context_lookup1 = &fast!((kContextLookup)[index1;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
--> src/decode.rs:2796:33
|>
2796 |> s.context_lookup2 = &fast!((kContextLookup)[index2;]);
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/decode.rs:2808:11
|>
2808 |> match result {
|> ^
help: try this
src/decode.rs: if let BrotliResult::NeedsMoreInput = result { result = SafeProcessCommands(s, local_input) }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: this function has too many arguments (8/7), #[warn(too_many_arguments)] on by default
--> src/lib.rs:124:1
|>
124 |> pub fn BrotliDecompressCustomIo ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#too_many_arguments
warning: very complex type used. Consider factoring parts into `type` definitions, #[warn(type_complexity)] on by default
--> src/lib.rs:266:34
|>
266 |> pub struct Decompressor(DecompressorCustomAlloc ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#type_complexity
warning: equality checks against false can be replaced by a negation, #[warn(bool_comparison)] on by default
--> src/lib.rs:403:40
|>
403 |> while avail_out == buf.len() && (needs_input == false || self.input_eof == false) {
|> ^^^^^^^^^^^^^^^^^^^^
help: try simplifying it as shown:
src/lib.rs: while avail_out == buf.len() && (!needs_input || self.input_eof == false) {
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#bool_comparison
warning: equality checks against false can be replaced by a negation, #[warn(bool_comparison)] on by default
--> src/lib.rs:403:64
|>
403 |> while avail_out == buf.len() && (needs_input == false || self.input_eof == false) {
|> ^^^^^^^^^^^^^^^^^^^^^^^
help: try simplifying it as shown:
src/lib.rs: while avail_out == buf.len() && (needs_input == false || !self.input_eof) {
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#bool_comparison
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/lib.rs:452:9
|>
452 |> match e.kind() {
|> ^
help: try this
src/lib.rs: if let io::ErrorKind::Interrupted = e.kind() { continue }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
--> src/lib.rs:464:15
|>
464 |> match e.kind() {
|> ^
help: try this
src/lib.rs: if let io::ErrorKind::Interrupted = e.kind() { continue }
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bin/brotli.rs:17:8
|>
17 |> return Rebox::{b : b};
|> ^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bin/brotli.rs: Rebox::{b : b}
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bin/brotli.rs:24:9
|>
24 |> return &(*self.b)[index]
|> ^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bin/brotli.rs: &(*self.b)[index]
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bin/brotli.rs:30:9
|>
30 |> return &mut (*self.b)[index]
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bin/brotli.rs: &mut (*self.b)[index]
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bin/brotli.rs:36:8
|>
36 |> return &*self.b
|> ^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bin/brotli.rs: &*self.b
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bin/brotli.rs:42:8
|>
42 |> return &mut*self.b
|> ^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bin/brotli.rs: &mut*self.b
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bin/brotli.rs:56:8
|>
56 |> return Rebox::{b : b};
|> ^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bin/brotli.rs: Rebox::{b : b}
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bin/brotli.rs:158:5
|>
158 |> return brotli::BrotliDecompressCustomIo(&mut IoReaderWrapper::(r),
|> ^
help: remove `return` as shown:
src/bin/brotli.rs: brotli::BrotliDecompressCustomIo(&mut IoReaderWrapper::(r),
src/bin/brotli.rs: &mut IoWriterWrapper::(w),
src/bin/brotli.rs: input_buffer.slice_mut(), output_buffer.slice_mut(),
src/bin/brotli.rs: alloc_u8,
src/bin/brotli.rs: HeapAllocator::{default_value:0},
src/bin/brotli.rs: HeapAllocator::{default_value:HuffmanCode::default()},
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bin/brotli.rs:189:9
|>
189 |> return BrotliDecompressor::(
|> ^
help: remove `return` as shown:
src/bin/brotli.rs: BrotliDecompressor::(
src/bin/brotli.rs: brotli::DecompressorCustomIo::,
src/bin/brotli.rs: Rebox,
src/bin/brotli.rs: HeapAllocator, HeapAllocator, HeapAllocator >
src/bin/brotli.rs: ::new(IntoIoReader::(r),
...
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: unneeded return statement, #[warn(needless_return)] on by default
--> src/bin/brotli.rs:204:8
|>
204 |> return self.0.read(buf);
|> ^^^^^^^^^^^^^^^^^^^^^^^^
help: remove `return` as shown:
src/bin/brotli.rs: self.0.read(buf)
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
warning: very complex type used. Consider factoring parts into `type` definitions, #[warn(type_complexity)] on by default
--> src/bin/brotli.rs:174:40
|>
174 |> pub struct BrotliDecompressor(brotli::DecompressorCustomIo ^
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#type_complexity