Skip to content

Commit

Permalink
Merge branch '0.10-dev' into streaming-iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
Quba1 authored Feb 3, 2024
2 parents daf25a0 + 1a40690 commit 7828cfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/codes_handle/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl FallibleStreamingIterator for CodesHandle<GribFile> {
None
} else {
Some(&self.unsafe_message)
}
}
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/codes_handle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl CodesHandle<GribFile> {
product_kind: ProductKind,
) -> Result<Self, CodesError> {
let file_pointer = open_with_fmemopen(&file_data)?;

Ok(CodesHandle {
_data: (DataContainer::FileBytes(file_data)),
source: GribFile {
Expand All @@ -273,6 +273,7 @@ impl CodesHandle<CodesIndex> {
index: CodesIndex,
product_kind: ProductKind,
) -> Result<Self, CodesError> {

let new_handle = CodesHandle {
_data: DataContainer::Empty(), //unused, index owns data
source: index,
Expand Down Expand Up @@ -427,7 +428,7 @@ mod tests {
.unwrap();

let handle = CodesHandle::new_from_memory(file_data, product_kind).unwrap();
assert!(!handle.source.pointer.is_null());
assert!(!handle.source.pointer.is_null());r
assert!(handle.unsafe_message.message_handle.is_null());
assert_eq!(handle.product_kind as u32, { ProductKind_PRODUCT_GRIB });

Expand Down
2 changes: 1 addition & 1 deletion tests/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ fn simulatenous_index_destructors() -> Result<()> {
thread::sleep(std::time::Duration::from_millis(sleep_time));
drop(index);
}

Ok(())
});

Expand Down

0 comments on commit 7828cfe

Please sign in to comment.