We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e26032f commit 3f26e25Copy full SHA for 3f26e25
1 file changed
crates/commitlog/src/lib.rs
@@ -99,9 +99,7 @@ impl Default for Options {
99
impl Options {
100
pub const DEFAULT_MAX_SEGMENT_SIZE: u64 = 1024 * 1024 * 1024;
101
pub const DEFAULT_MAX_RECORDS_IN_COMMIT: NonZeroU16 = NonZeroU16::MAX;
102
- pub const DEFAULT_OFFSET_INDEX_INTERVAL_BYTES: NonZeroU64 =
103
- // SAFETY: 4096 > 0, qed
104
- unsafe { NonZeroU64::new_unchecked(4096) };
+ pub const DEFAULT_OFFSET_INDEX_INTERVAL_BYTES: NonZeroU64 = NonZeroU64::new(4096).expect("4096 > 0, qed");
105
pub const DEFAULT_OFFSET_INDEX_REQUIRE_SEGMENT_FSYNC: bool = false;
106
107
pub const DEFAULT: Self = Self {
0 commit comments