Skip to content

Commit 25d7ac0

Browse files
fix: move S3_MIN_PART_SIZE constant to module scope
Fixes clippy::items_after_statements lint by moving the constant out of the factory closure to the module-level constants section. Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
1 parent 0d3fb92 commit 25d7ac0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/nodes/src/core/object_store_write.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ use streamkit_core::{
3535
/// Default buffer/chunk size: 5 MiB (the S3 minimum multipart part size).
3636
const DEFAULT_CHUNK_SIZE: usize = 5 * 1024 * 1024;
3737

38+
/// S3 minimum multipart part size (5 MiB). Intermediate parts smaller than
39+
/// this will be rejected with `EntityTooSmall`; only the final part may be
40+
/// smaller.
41+
const S3_MIN_PART_SIZE: usize = 5 * 1024 * 1024;
42+
3843
const fn default_chunk_size() -> usize {
3944
DEFAULT_CHUNK_SIZE
4045
}
@@ -284,7 +289,6 @@ impl ObjectStoreWriteNode {
284289
));
285290
}
286291

287-
const S3_MIN_PART_SIZE: usize = 5 * 1024 * 1024;
288292
if config.chunk_size < S3_MIN_PART_SIZE && params.is_some() {
289293
tracing::warn!(
290294
chunk_size = config.chunk_size,

0 commit comments

Comments
 (0)