From 7de3d0f0162c0dc2bf45859871262593d9d432f6 Mon Sep 17 00:00:00 2001 From: Christopher Berner Date: Sun, 26 Nov 2023 11:29:58 -0800 Subject: [PATCH 1/2] Run clippy --fix --- benches/decode_benchmark.rs | 2 +- src/decoder.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benches/decode_benchmark.rs b/benches/decode_benchmark.rs index 2a72eeb..5307d56 100644 --- a/benches/decode_benchmark.rs +++ b/benches/decode_benchmark.rs @@ -24,7 +24,7 @@ fn benchmark(symbol_size: u16, overhead: f64) -> u64 { let config = ObjectTransmissionInformation::new(0, symbol_size, 0, 1, 1); let encoder = SourceBlockEncoder::new2(1, &config, &data); let elements_and_overhead = (symbol_count as f64 * (1.0 + overhead)) as u32; - let mut packets = encoder.repair_packets(0, (iterations as u32 * elements_and_overhead)); + let mut packets = encoder.repair_packets(0, iterations as u32 * elements_and_overhead); let now = Instant::now(); for _ in 0..iterations { let mut decoder = SourceBlockDecoder::new2(1, &config, elements as u64); diff --git a/src/decoder.rs b/src/decoder.rs index 6ac2323..66d64b1 100644 --- a/src/decoder.rs +++ b/src/decoder.rs @@ -553,7 +553,7 @@ mod codec_tests { let config = ObjectTransmissionInformation::new(0, symbol_size, 0, 1, 1); let encoder = SourceBlockEncoder::new2(1, &config, &data); let elements_and_overhead = (symbol_count as f64 * (1.0 + overhead)) as u32; - let mut packets = encoder.repair_packets(0, (iterations as u32 * elements_and_overhead)); + let mut packets = encoder.repair_packets(0, iterations as u32 * elements_and_overhead); for _ in 0..iterations { let mut decoder = SourceBlockDecoder::new2(1, &config, elements as u64); let start = packets.len() - elements_and_overhead as usize; From c9bf5948a6ba66602f7c018d3e0cc35c170a030f Mon Sep 17 00:00:00 2001 From: Christopher Berner Date: Sun, 26 Nov 2023 11:30:10 -0800 Subject: [PATCH 2/2] Fix cargo-deny warnings --- Makefile | 2 +- deny.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9008c8b..36fd14a 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ build: pre .PHONY: pre pre: - cargo deny check licenses + cargo deny --all-features check licenses cargo fmt --all -- --check cargo clippy --all diff --git a/deny.toml b/deny.toml index 3af17bd..db672a4 100644 --- a/deny.toml +++ b/deny.toml @@ -74,7 +74,7 @@ allow = [ # "BSD-2-Clause", # "BSD-3-Clause", "Apache-2.0", - #"Apache-2.0 WITH LLVM-exception", + "Apache-2.0 WITH LLVM-exception", ] # List of explictly disallowed licenses # See https://spdx.org/licenses/ for list of possible licenses