Mercurial > hg-stable
view .editorconfig @ 42754:388622cbc911
rust-discovery: core implementation for take_quick_sample()
This makes in particular `rand` no longer a testing dependency.
We keep a seedable random generator on the `PartialDiscovery` object
itself, to avoid lengthy initialization.
In take_quick_sample() itself, we had to avoid keeping the reference
to `self.undecided` to cope with the mutable reference introduced
by the the call to `limit_sample`, but it's still manageable without
resorting to inner mutability.
Sampling being prone to be improved in the mid-term future, testing
is minimal, amounting to checking which code path got executed.
Differential Revision: https://phab.mercurial-scm.org/D6423
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Fri, 17 May 2019 01:56:56 +0200 |
parents | 1d6066336d7b |
children | c25efc468a49 |
line wrap: on
line source
# See http://EditorConfig.org for the specification root = true [*.py] indent_size = 4 indent_style = space trim_trailing_whitespace = true [*.{c,h}] indent_size = 8 indent_style = tab trim_trailing_whitespace = true [*.t] indent_size = 2 indent_style = space trim_trailing_whitespace = false