Skip to content

Commit 365c3e1

Browse files
committed
address comments
1 parent cf72cc3 commit 365c3e1

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

ffi/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,7 @@ mod private {
402402
let boxed = val.into_boxed_slice();
403403
let leaked_ptr = Box::leak(boxed).as_mut_ptr();
404404
// safety: Box::leak always returns a valid, non-null pointer
405-
#[allow(clippy::expect_used)]
406-
let ptr = NonNull::new(leaked_ptr)
407-
.expect("This should never be null please report this bug.");
405+
let ptr = unsafe { NonNull::new_unchecked(leaked_ptr) };
408406
KernelOwnedBytes { ptr, len }
409407
}
410408
}

ffi/src/scan.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ pub unsafe extern "C" fn scan_physical_schema(scan: Handle<SharedScan>) -> Handl
439439
/// - [`OptionalValue::Some`] wraps a [`KernelOwnedBytes`](crate::KernelOwnedBytes) buffer holding
440440
/// the proto-serialized `delta.kernel.operation.Operation` message (a `QueryPlan`). The engine
441441
/// owns the buffer and must free it with [`free_kernel_bytes`](crate::free_kernel_bytes).
442-
/// - [`OptionalValue::None`] means there is no plan to execute: either the scan's predicate
443-
/// statically skips all files, or no Delta metadata matches this scan (empty result).
442+
/// - [`OptionalValue::None`] means there is no plan to execute because the scan's predicate
443+
/// statically skips all files.
444444
///
445445
/// # Safety
446446
///

0 commit comments

Comments
 (0)