rust: clean remains of direct-ffi code
Since
b55bec1ea972, the cext entry poitn have been removed, so we drop the code
for consistency.
--- a/mercurial/ancestor.py Fri Mar 06 17:02:50 2020 +0100
+++ b/mercurial/ancestor.py Tue Mar 10 14:24:08 2020 +0100
@@ -393,39 +393,3 @@
# free up memory.
self._containsiter = None
return False
-
-
-class rustlazyancestors(object):
- def __init__(self, index, revs, stoprev=0, inclusive=False):
- self._index = index
- self._stoprev = stoprev
- self._inclusive = inclusive
- # no need to prefilter out init revs that are smaller than stoprev,
- # it's done by rustlazyancestors constructor.
- # we need to convert to a list, because our ruslazyancestors
- # constructor (from C code) doesn't understand anything else yet
- self._initrevs = initrevs = list(revs)
-
- self._containsiter = parsers.rustlazyancestors(
- index, initrevs, stoprev, inclusive
- )
-
- def __nonzero__(self):
- """False if the set is empty, True otherwise.
-
- It's better to duplicate this essentially trivial method than
- to subclass lazyancestors
- """
- try:
- next(iter(self))
- return True
- except StopIteration:
- return False
-
- def __iter__(self):
- return parsers.rustlazyancestors(
- self._index, self._initrevs, self._stoprev, self._inclusive
- )
-
- def __contains__(self, target):
- return target in self._containsiter
--- a/mercurial/revlog.py Fri Mar 06 17:02:50 2020 +0100
+++ b/mercurial/revlog.py Tue Mar 10 14:24:08 2020 +0100
@@ -945,9 +945,6 @@
if rustancestor is not None:
lazyancestors = rustancestor.LazyAncestors
arg = self.index
- elif util.safehasattr(parsers, b'rustlazyancestors'):
- lazyancestors = ancestor.rustlazyancestors
- arg = self.index
else:
lazyancestors = ancestor.lazyancestors
arg = self._uncheckedparentrevs