Compare commits

...

1 Commits

Author SHA1 Message Date
yongkangc
941e910675 chore(db): remove duplicate cursor method
Amp-Thread-ID: https://ampcode.com/threads/T-019c2204-faa0-7358-a2a6-c5be6da3d17b
2026-02-03 05:57:08 +00:00
2 changed files with 1 additions and 6 deletions

View File

@@ -95,7 +95,7 @@ impl<K: TransactionKind> Tx<K> {
pub fn new_cursor<T: Table>(&self) -> Result<Cursor<K, T>, DatabaseError> {
let inner = self
.inner
.cursor_with_dbi(self.get_dbi::<T>()?)
.cursor(self.get_dbi::<T>()?)
.map_err(|e| DatabaseError::InitCursor(e.into()))?;
Ok(Cursor::new_with_metrics(

View File

@@ -257,11 +257,6 @@ where
Cursor::new(self.clone(), dbi)
}
/// Open a new cursor on the given dbi.
pub fn cursor_with_dbi(&self, dbi: ffi::MDBX_dbi) -> Result<Cursor<K>> {
Cursor::new(self.clone(), dbi)
}
/// Disables a timeout for this read transaction.
#[cfg(feature = "read-tx-timeouts")]
pub fn disable_timeout(&self) {