HomePhabricator

pure: guard against empty blocks

Authored by indygreg.

Description

pure: guard against empty blocks

If blocks is empty, we append None to the returned list, which is
incorrect.

This subtle issue was caught by pytype, which correctly identified
the return value as List[Optional[Tuple]] because of this possibility.

Differential Revision: https://phab.mercurial-scm.org/D9279

Details

Committed
indygregNov 7 2020, 7:45 PM
Differential Revision
D9279: pure: guard against empty blocks
Parents
rHG5c736ba5dc27: rust-status: don't bubble up os errors, translate them to bad matches
Branches
Unknown
Tags
Unknown