Skip to content

Commit

Permalink
Make use_variable_size_chunks param a bool type instead of Option<bool>
Browse files Browse the repository at this point in the history
Default value for use_variable_size_chunks is now False instead of None, and so the `.unwrap_or(false)` call can be removed.
  • Loading branch information
weiji14 authored and tmontaigu committed Sep 19, 2024
1 parent 5840f0b commit 6dac6dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ impl LazVlr {
_cls: &Bound<'py, PyType>,
point_format_id: u8,
num_extra_bytes: u16,
use_variable_size_chunks: Option<bool>,
use_variable_size_chunks: bool,
) -> PyResult<Self> {
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();
}

Expand Down

0 comments on commit 6dac6dc

Please sign in to comment.