fix: Remove needless casts. Thanks clippy!
parent
72aab99951
commit
39acfc4f0d
|
@ -254,7 +254,7 @@ async fn compact_candidates_with_memory_budget<C, Fut>(
|
|||
// . already considered all remaining candidates.
|
||||
// . hit the max number of partitions to compact in parallel
|
||||
if (!parallel_compacting_candidates.is_empty())
|
||||
&& ((remaining_budget_bytes <= (compactor.config.memory_budget_bytes / 10) as u64)
|
||||
&& ((remaining_budget_bytes <= compactor.config.memory_budget_bytes / 10)
|
||||
|| (candidates.is_empty())
|
||||
|| (count == num_remaining_candidates)
|
||||
|| (count as u64 == compactor.config.max_parallel_partitions))
|
||||
|
|
|
@ -141,7 +141,7 @@ pub fn encode(src: &[f64], dst: &mut Vec<u8>) -> Result<(), Box<dyn Error>> {
|
|||
if m <= 3 {
|
||||
// 5 bits fit in current byte
|
||||
dst[n >> 3] |= (mask >> m) as u8;
|
||||
n += l as usize;
|
||||
n += l;
|
||||
} else {
|
||||
// not enough bits available in current byte
|
||||
let written = 8 - m;
|
||||
|
|
|
@ -53,7 +53,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn encode_uncompressed() {
|
||||
let src: Vec<u64> = vec![1000, 0, simple8b::MAX_VALUE as u64, 213123421];
|
||||
let src: Vec<u64> = vec![1000, 0, simple8b::MAX_VALUE, 213123421];
|
||||
let mut dst = vec![];
|
||||
|
||||
let exp = src.clone();
|
||||
|
|
|
@ -357,7 +357,7 @@ fn truncate_by_months(t: i64, d: &Duration) -> i64 {
|
|||
|
||||
// Determine the total number of months and truncate
|
||||
// the number of months by the duration amount.
|
||||
let mut total = (year * 12) as i32 + (month - 1) as i32;
|
||||
let mut total = (year * 12) + (month - 1) as i32;
|
||||
let remainder = total % d.months() as i32;
|
||||
total -= remainder;
|
||||
|
||||
|
|
Loading…
Reference in New Issue