diff --git a/src/raw/client.rs b/src/raw/client.rs index 7957deb..1ccee04 100644 --- a/src/raw/client.rs +++ b/src/raw/client.rs @@ -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}; diff --git a/src/transaction/buffer.rs b/src/transaction/buffer.rs index d1c0304..b785ff2 100644 --- a/src/transaction/buffer.rs +++ b/src/transaction/buffer.rs @@ -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) diff --git a/src/transaction/transaction.rs b/src/transaction/transaction.rs index bf4a6a3..f4e4509 100644 --- a/src/transaction/transaction.rs +++ b/src/transaction/transaction.rs @@ -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}; diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 96ab7fe..07621e4 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -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?;