Skip to content

Commit 67c2f5d

Browse files
committed
fix clippy lints
Signed-off-by: Petros Angelatos <[email protected]>
1 parent 867e047 commit 67c2f5d

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

src/storage/src/render/persist_sink.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -159,22 +159,6 @@ impl AddAssign<&BatchMetrics> for BatchMetrics {
159159
}
160160
}
161161

162-
impl BatchMetrics {
163-
fn is_empty(&self) -> bool {
164-
let BatchMetrics {
165-
inserts: self_inserts,
166-
retractions: self_retractions,
167-
error_inserts: self_error_inserts,
168-
error_retractions: self_error_retractions,
169-
} = self;
170-
171-
*self_inserts == 0
172-
&& *self_retractions == 0
173-
&& *self_error_inserts == 0
174-
&& *self_error_retractions == 0
175-
}
176-
}
177-
178162
/// Manages batches and metrics.
179163
struct BatchBuilderAndMetadata<K, V, T, D>
180164
where

src/storage/src/source.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ pub use kafka::KafkaSourceReader;
4040
pub use source_reader_pipeline::{
4141
create_raw_source, RawSourceCreationConfig, SourceExportCreationConfig,
4242
};
43+
use mz_ore::cast::CastFrom;
4344
use timely::container::{PushInto, SizableContainer};
4445
use timely::dataflow::channels::pact::Pipeline;
4546
use timely::dataflow::operators::generic::builder_rc::OperatorBuilder;
@@ -78,8 +79,8 @@ impl<G: Scope, C: Container> PartitionCore<G, C> for StreamCore<G, C> {
7879
let mut builder = OperatorBuilder::new("Partition".to_owned(), self.scope());
7980

8081
let mut input = builder.new_input(self, Pipeline);
81-
let mut outputs = Vec::with_capacity(parts as usize);
82-
let mut streams = Vec::with_capacity(parts as usize);
82+
let mut outputs = Vec::with_capacity(usize::cast_from(parts));
83+
let mut streams = Vec::with_capacity(usize::cast_from(parts));
8384

8485
for _ in 0..parts {
8586
let (output, stream) = builder.new_output();

0 commit comments

Comments
 (0)