Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceg committed Oct 20, 2023
1 parent e8e8a9c commit a8758d8
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions lib/vector-stream/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ tracing = { version = "0.1.34", default-features = false }
twox-hash = { version = "1.6.3", default-features = false }
vector-common = { path = "../vector-common" }
vector-core = { path = "../vector-core" }

[dev-dependencies]
proptest = "1.3"
rand = "0.8.5"
rand_distr = "0.4.3"
2 changes: 1 addition & 1 deletion lib/vector-stream/src/batcher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ mod test {
use futures::stream;

use super::*;
use crate::stream::BatcherSettings;
use crate::BatcherSettings;

#[tokio::test]
async fn item_limit() {
Expand Down
3 changes: 2 additions & 1 deletion lib/vector-stream/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ mod tests {
}

impl Finalizable for DelayRequest {
fn take_finalizers(&mut self) -> crate::event::EventFinalizers {
fn take_finalizers(&mut self) -> vector_core::event::EventFinalizers {
std::mem::take(&mut self.1)
}
}
Expand Down Expand Up @@ -365,6 +365,7 @@ mod tests {
let upper = self.upper_bound_us;

// Generate a value between 10ms and 500ms, with a long tail shape to the distribution.
#[allow(clippy::cast_sign_loss)] // Value will be positive anyways
self.jitter
.sample_iter(&mut self.jitter_gen)
.map(|n| n * lower as f64)
Expand Down
12 changes: 12 additions & 0 deletions lib/vector-stream/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#![deny(warnings)]
#![deny(clippy::all)]
#![deny(clippy::pedantic)]
#![deny(unreachable_pub)]
#![deny(unused_allocation)]
#![deny(unused_extern_crates)]
#![deny(unused_assignments)]
#![deny(unused_comparisons)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::must_use_candidate)]
#![allow(clippy::type_complexity)]

pub mod batcher;
mod concurrent_map;
mod driver;
Expand Down
10 changes: 4 additions & 6 deletions lib/vector-stream/src/partitioned_batcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ where
}
}

#[allow(clippy::cast_sign_loss)]
#[cfg(test)]
mod test {
use std::{
Expand All @@ -360,14 +361,11 @@ mod test {
use pin_project::pin_project;
use proptest::prelude::*;
use tokio::{pin, time::advance};
use vector_core::{partition::Partitioner, time::KeyedTimer};

use crate::{
partition::Partitioner,
stream::{
partitioned_batcher::{ExpirationQueue, PartitionedBatcher},
BatcherSettings,
},
time::KeyedTimer,
partitioned_batcher::{ExpirationQueue, PartitionedBatcher},
BatcherSettings,
};

#[derive(Debug)]
Expand Down

0 comments on commit a8758d8

Please sign in to comment.