Signed-off-by: ekexium <ekexium@gmail.com>
This commit is contained in:
ekexium 2020-10-12 11:53:54 +08:00
parent da7d0d9d1f
commit 319ec52545
4 changed files with 4 additions and 7 deletions

View File

@ -103,7 +103,7 @@ impl Client {
/// Create a new 'batch get' request.
///
/// Once resolved this request will result in the fetching of the values associated with the
/// given keys, skipping non-existent entris.
/// given keys, skipping non-existent entries.
///
/// ```rust,no_run
/// # use tikv_client::{KvPair, Config, RawClient};

View File

@ -63,10 +63,7 @@ impl Buffer {
let cached_results = cached_results
.into_iter()
.filter_map(|(k, v)| match v.unwrap() {
Some(v) => Some(KvPair(k, v)),
None => None,
});
.filter_map(|(k, v)| v.unwrap().map(|v| KvPair(k, v)));
let undetermined_keys = undetermined_keys.into_iter().map(|(k, _)| k).collect();
(cached_results, undetermined_keys)

View File

@ -75,7 +75,7 @@ impl Transaction {
.await
}
/// Gets the values associated with the given keys, skipping non-existent entris.
/// Gets the values associated with the given keys, skipping non-existent entries.
///
/// ```rust,no_run
/// # use tikv_client::{Key, Value, Config, transaction::Client};

View File

@ -18,7 +18,7 @@ const SCAN_BATCH_SIZE: u32 = 1000;
const NUM_PEOPLE: u32 = 100;
const NUM_TRNASFER: u32 = 100;
/// Delete all entris in TiKV to leave a clean space for following tests.
/// Delete all entries in TiKV to leave a clean space for following tests.
/// TiKV does not provide an elegant way to do this, so it is done by scanning and deletions.
async fn clear_tikv() -> Fallible<()> {
delete_all_raw().await?;