This is an archive of the discontinued Mercurial Phabricator instance.

rust-cpython: removed now useless py_set() conversion
ClosedPublic

Authored by gracinet on Oct 16 2019, 11:25 AM.

Details

Summary

In rust-cpython 0.3.0, HashSets implement the appropriate
ToPythonObject, we can therefore get rid of this hacky conversion.

There still remains an inefficiency in MissingAncestors.bases():
we have to clone, because to_py_object() requires full ownership.
However:

  • the only use case outside of unit tests used to be from

setdiscovery.partialdiscovery which is now fully implemented
in Rust.

  • it's not worse than what py_set() used to do

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

gracinet created this revision.Oct 16 2019, 11:25 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.