format code

Signed-off-by: ekexium <ekexium@gmail.com>
This commit is contained in:
ekexium 2020-09-29 18:17:49 +08:00
parent cd9c87e24b
commit 10b6f44b45
2 changed files with 9 additions and 3 deletions

View File

@ -153,7 +153,10 @@ pub trait PdClient: Send + Sync + 'static {
let region_end = region.end_key();
let mut grouped = vec![];
if !region_end.is_empty()
&& end_key.clone().map(|x| x > region_end || x.is_empty()).unwrap_or(true)
&& end_key
.clone()
.map(|x| x > region_end || x.is_empty())
.unwrap_or(true)
{
grouped.push((start_key, region_end.clone()).into());
ranges.push((region_end, end_key).into());
@ -168,7 +171,10 @@ pub trait PdClient: Send + Sync + 'static {
break;
}
if !region_end.is_empty()
&& end_key.clone().map(|x| x > region_end || x.is_empty()).unwrap_or(true)
&& end_key
.clone()
.map(|x| x > region_end || x.is_empty())
.unwrap_or(true)
{
grouped.push((start_key, region_end.clone()).into());
ranges.push((region_end, end_key).into());

View File

@ -485,7 +485,7 @@ async fn raw_write_million() -> Fallible<()> {
let _ = client
.batch_scan(iter::repeat(vec![]..).take(batch_num), limit)
.await?;
// FIXME: `each_limit` parameter does no work as expected.
// FIXME: `each_limit` parameter does no work as expected.
// It limits the entries on each region of each rangqe, instead of each range.
// assert_eq!(res.len(), limit as usize * batch_num);
}