# HG changeset patch # User Raphaël Gomès # Date 2023-01-09 17:03:24 # Node ID 4c71c215bcfeacdd9dddec7b6c26f2eabcf2ccbb # Parent 321e2b7bc95c275fafdaec32896da8dec33db67f rust-clippy: factor an `if` with the same duplicated clause Unlike the next changeset, this if is not really made clearer by keeping the cases separate. diff --git a/rust/hg-core/src/revlog/revlog.rs b/rust/hg-core/src/revlog/revlog.rs --- a/rust/hg-core/src/revlog/revlog.rs +++ b/rust/hg-core/src/revlog/revlog.rs @@ -111,9 +111,7 @@ impl Revlog { Some(Box::new(data_mmap)) }; - let nodemap = if index.is_inline() { - None - } else if !use_nodemap { + let nodemap = if index.is_inline() || !use_nodemap { None } else { NodeMapDocket::read_from_file(store_vfs, index_path)?.map(