зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
9a9c8d0dd9
Коммит
15a1266874
|
@ -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(())
|
||||||
|
|
Загрузка…
Ссылка в новой задаче