LookaheadIterator doesn't need lifetime annotation as it depends on language only

This commit is contained in:
Daumantas Kavolis 2023-07-12 15:34:08 +03:00
parent fd8fd3f535
commit 8d5462cea4
2 changed files with 11 additions and 11 deletions

View file

@ -133,14 +133,14 @@ impl QueryCursor {
}
}
impl<'a> LookaheadIterator<'a> {
impl LookaheadIterator {
/// Reconstructs a [LookaheadIterator] from a raw pointer.
///
/// # Safety
///
/// `ptr` must be non-null.
pub unsafe fn from_raw(ptr: *mut TSLookaheadIterator) -> LookaheadIterator<'a> {
LookaheadIterator(NonNull::new_unchecked(ptr), PhantomData)
pub unsafe fn from_raw(ptr: *mut TSLookaheadIterator) -> LookaheadIterator {
LookaheadIterator(NonNull::new_unchecked(ptr))
}
/// Consumes the [LookaheadIterator], returning a raw pointer to the underlying C structure.