Bug 1557176 - Clippy fix for kvstore r=myk

Differential Revision: https://phabricator.services.mozilla.com/D33984

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nan Jiang 2019-06-06 23:02:51 +00:00
Родитель 9a9c8d0dd9
Коммит 15a1266874
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -132,13 +132,12 @@ fn round_to_pagesize(size: usize) -> usize {
fn active_resize(env: &Rkv) -> Result<(), StoreError> { fn active_resize(env: &Rkv) -> Result<(), StoreError> {
let info = env.info()?; let info = env.info()?;
let current_size = info.map_size(); let current_size = info.map_size();
let size;
if current_size < INCREMENTAL_RESIZE_THRESHOLD { let size = if current_size < INCREMENTAL_RESIZE_THRESHOLD {
size = current_size << 1; current_size << 1
} else { } else {
size = current_size + INCREMENTAL_RESIZE_STEP; current_size + INCREMENTAL_RESIZE_STEP
} };
env.set_map_size(size)?; env.set_map_size(size)?;
Ok(()) Ok(())