From 3cd5c606a7d34e707e5caa0e67c35d4f6befacc8 Mon Sep 17 00:00:00 2001 From: xiaobogaga Date: Mon, 1 Apr 2019 11:17:33 +0800 Subject: [PATCH 1/3] add comment for ReadOptions.set_iterate_upper_bound method. --- src/db.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index 905dff3..5c1fdb6 100644 --- a/src/db.rs +++ b/src/db.rs @@ -1768,9 +1768,10 @@ impl ReadOptions { } } + /// set_iterate_upper_bound sets the upper bound for an iterator, and the upper bound itself + /// is not included on the iteration result. pub fn set_iterate_upper_bound>(&mut self, key: K) { let key = key.as_ref(); - unsafe { ffi::rocksdb_readoptions_set_iterate_upper_bound( self.inner, From e99bf485ef92577f5461a91e07a770664d6aae8c Mon Sep 17 00:00:00 2001 From: xiaobogaga Date: Tue, 2 Apr 2019 10:05:57 +0800 Subject: [PATCH 2/3] address comment (#292) --- src/db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db.rs b/src/db.rs index 5c1fdb6..6f54797 100644 --- a/src/db.rs +++ b/src/db.rs @@ -1104,7 +1104,7 @@ impl DB { DBIterator::new_cf(self, cf_handle, &readopts, mode) } - /// Opens an interator with `set_total_order_seek` enabled. + /// Opens an iterator with `set_total_order_seek` enabled. /// This must be used to iterate across prefixes when `set_memtable_factory` has been called /// with a Hash-based implementation. pub fn full_iterator(&self, mode: IteratorMode) -> DBIterator { @@ -1768,7 +1768,7 @@ impl ReadOptions { } } - /// set_iterate_upper_bound sets the upper bound for an iterator, and the upper bound itself + /// Set the upper bound for an iterator, and the upper bound itself /// is not included on the iteration result. pub fn set_iterate_upper_bound>(&mut self, key: K) { let key = key.as_ref(); From f997a0a2980dd07c3fc5cd99de792c1e83f7225e Mon Sep 17 00:00:00 2001 From: xiaobogaga Date: Tue, 2 Apr 2019 13:08:14 +0800 Subject: [PATCH 3/3] shorter comment --- src/db.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/db.rs b/src/db.rs index 6f54797..4c1e233 100644 --- a/src/db.rs +++ b/src/db.rs @@ -1768,8 +1768,7 @@ impl ReadOptions { } } - /// Set the upper bound for an iterator, and the upper bound itself - /// is not included on the iteration result. + /// Set the upper bound for an iterator, and the upper bound itself is not included on the iteration result. pub fn set_iterate_upper_bound>(&mut self, key: K) { let key = key.as_ref(); unsafe {