diff -r ef8dcee272ac -r 26114bd6ec60 rust/hg-cpython/src/utils.rs --- a/rust/hg-cpython/src/utils.rs Mon Jun 15 15:14:16 2020 -0400 +++ b/rust/hg-cpython/src/utils.rs Mon Jun 15 18:26:40 2020 +0200 @@ -32,10 +32,7 @@ /// Clone incoming Python bytes given as `PyBytes` as a `Node`, /// doing the necessary checks. -pub fn node_from_py_bytes<'a>( - py: Python, - bytes: &'a PyBytes, -) -> PyResult { +pub fn node_from_py_bytes(py: Python, bytes: &PyBytes) -> PyResult { ::try_from(bytes.data(py)) .map_err(|_| { PyErr::new::( @@ -43,5 +40,5 @@ format!("{}-byte hash required", NODE_BYTES_LENGTH), ) }) - .map(|n| n.into()) + .map(Into::into) }