Merge branch 'master' into fix-region-range

This commit is contained in:
ekexium 2020-09-15 14:27:46 +08:00 committed by GitHub
commit fb16ded290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -189,8 +189,7 @@ impl Into<kvrpcpb::KeyRange> for BoundRange {
let (start, end) = self.into_keys();
let mut range = kvrpcpb::KeyRange::default();
range.set_start_key(start.into());
// FIXME handle end = None rather than unwrapping
end.map(|k| range.set_end_key(k.into())).unwrap();
range.set_end_key(end.unwrap_or_default().into());
range
}
}