# HG changeset patch # User Raphaël Gomès # Date 1561971216 -7200 # Node ID 11c025c833937a751c74f66c93d8c41410e1b13f # Parent d26e4a434fe5181ff278ea71e1b19e6596328911 rust: simplify overly complicated expression Differential Revision: https://phab.mercurial-scm.org/D6592 diff -r d26e4a434fe5 -r 11c025c83393 rust/hg-cpython/src/dirstate.rs --- a/rust/hg-cpython/src/dirstate.rs Mon Jul 01 10:50:18 2019 +0200 +++ b/rust/hg-cpython/src/dirstate.rs Mon Jul 01 10:53:36 2019 +0200 @@ -291,8 +291,7 @@ Ok(self .dirs_map(py) .borrow() - .get(&item.extract::(py)?.data(py).to_owned()) - .is_some()) + .contains_key(item.extract::(py)?.data(py).as_ref())) } });