[Accepted] D11380: rhg: fallback if the current command has any generic hook defined

SimonSapin phabricator at mercurial-scm.org
Thu Sep 2 18:36:54 UTC 2021


SimonSapin added inline comments.
SimonSapin accepted this revision.

INLINE COMMENTS

> main.rs:72
> +
> +    for prefix in [&"pre", &"post", &"fail"].iter() {
> +        // Mercurial allows users to define generic hooks for commands,

Nit: `"string literals"` have type `&'static str`, so the extra `&` operators are unnecessary. (This `prefix` ends up with triple pointer indirection `&&&str` since `.iter()` adds another one! But by-value array iteration requires Rust 1.53)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11380/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11380

To: Alphare, #hg-reviewers, SimonSapin
Cc: SimonSapin, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210902/43da3faa/attachment-0002.html>


More information about the Mercurial-patches mailing list