diff --git a/rust/hg-cpython/src/dirstate.rs b/rust/hg-cpython/src/dirstate.rs --- a/rust/hg-cpython/src/dirstate.rs +++ b/rust/hg-cpython/src/dirstate.rs @@ -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())) } });