mercurial/utils/hashutil.py
author Raphaël Gomès <rgomes@octobus.net>
Mon, 09 Jan 2023 19:07:44 +0100
changeset 49928 ccb6cfb0f2c0
parent 48875 6000f5b25c9b
child 51863 f4733654f144
permissions -rw-r--r--
rust-filepatterns: don't `Box` subincludes unnecessarily This was caught by `clippy`.

import hashlib

try:
    from ..thirdparty import sha1dc  # pytype: disable=import-error

    sha1 = sha1dc.sha1
except (ImportError, AttributeError):
    sha1 = hashlib.sha1