From 6dac6dc2144ff5fe314ff0f47c51b7d607ac22e0 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:38:50 +1200 Subject: [PATCH] Make use_variable_size_chunks param a bool type instead of Option Default value for use_variable_size_chunks is now False instead of None, and so the `.unwrap_or(false)` call can be removed. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b0440d7..faee8db 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -69,13 +69,13 @@ impl LazVlr { _cls: &Bound<'py, PyType>, point_format_id: u8, num_extra_bytes: u16, - use_variable_size_chunks: Option, + use_variable_size_chunks: bool, ) -> PyResult { let mut builder = laz::LazVlrBuilder::default() .with_point_format(point_format_id, num_extra_bytes) .map_err(into_py_err)?; - if use_variable_size_chunks.unwrap_or(false) { + if use_variable_size_chunks { builder = builder.with_variable_chunk_size(); }