Skip to content

Commit cdcd23d

Browse files
committed
fix: lints
1 parent 40c2c0e commit cdcd23d

File tree

3 files changed

+4
-34
lines changed

3 files changed

+4
-34
lines changed

crates/category-batcher/src/lib.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -51,36 +51,6 @@ impl std::error::Error for BatchError {}
5151

5252
/// A batching mechanism that groups values by category and flushes them
5353
/// based on size or time thresholds.
54-
///
55-
/// # Guarantees
56-
/// - Values within the same group are flushed in the order they were added.
57-
/// - No ordering guarantees exist between different groups.
58-
/// - On shutdown, all pending batches are flushed before the receiver closes.
59-
///
60-
/// # Example
61-
/// ```no_run
62-
/// use std::time::Duration;
63-
///
64-
/// # async fn example() {
65-
/// let config = BatchConfig {
66-
/// max_size: 10,
67-
/// max_time: Duration::from_secs(1),
68-
/// ..Default::default()
69-
/// };
70-
///
71-
/// let (batcher, mut receiver) = CategoricalBatcher::new(config);
72-
///
73-
/// // Add values
74-
/// let _ = batcher.add("group1", "value1").await.unwrap();
75-
/// let _ = batcher.add("group1", "value2").await.unwrap();
76-
/// let _ = batcher.add("group2", "value3").await.unwrap();
77-
///
78-
/// // Receive batches
79-
/// while let Some((group, values)) = receiver.recv().await {
80-
/// println!("Received {} values for group {}", values.len(), group);
81-
/// }
82-
/// # }
83-
/// ```
8454
#[derive(Clone)]
8555
pub struct CategoricalBatcher<G, V> {
8656
tx: mpsc::Sender<(G, V)>,

crates/metrics-types/src/compute.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ pub struct UnstampedComputeUsageEvent {
5252
}
5353

5454
impl UnstampedComputeUsageEvent {
55-
/// Makes a [`ComputeEvent`] out of a [`UnstampedComputeEvent`] with the
56-
/// remaining information and timestamp.
55+
/// Makes a [`ComputeUsageEvent`] out of a [`UnstampedComputeUsageEvent`] with
56+
/// the remaining information and timestamp.
5757
pub fn stamp_with_now(
5858
self,
5959
entry_id: RecordId<Entry>,

crates/metrics-types/src/egress.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ pub struct UnstampedEgressUsageEvent {
5050
}
5151

5252
impl UnstampedEgressUsageEvent {
53-
/// Makes an [`EgressEvent`] out of a [`UnstampedEgressEvent`] with the
54-
/// remaining information and timestamp.
53+
/// Makes an [`EgressUsageEvent`] out of a [`UnstampedEgressUsageEvent`] with
54+
/// the remaining information and timestamp.
5555
pub fn stamp_with_now(self, byte_count: u64) -> EgressUsageEvent {
5656
let timestamp = UtcDateTime::now();
5757
EgressUsageEvent {

0 commit comments

Comments
 (0)