sapling/eden/scm/lib/radixbuf
David Tolnay d1d8fb939a Switch from failure::Fail trait to std::error::Error for errors
Summary:
This diff replaces eden's dependencies on failure::Error with anyhow::Error.

Failure's error type requires all errors to have an implementation of failure's own failure::Fail trait in order for cause chains and backtraces to work. The necessary methods for this functionality have made their way into the standard library error trait, so modern error libraries build directly on std::error::Error rather than something like failure::Fail. Once we are no longer tied to failure 0.1's Fail trait, different parts of the codebase will be free to use any std::error::Error-based libraries they like while still working nicely together.

Reviewed By: xavierd

Differential Revision: D18576093

fbshipit-source-id: e2d862b659450f2969520d9b74877913fabb2e5d
2019-11-22 08:53:31 -08:00
..
benches Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
src Switch from failure::Fail trait to std::error::Error for errors 2019-11-22 08:53:31 -08:00
Cargo.toml Switch from failure::Fail trait to std::error::Error for errors 2019-11-22 08:53:31 -08:00
README.md Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00

radixbuf

Radix tree based on plain buffers.

There are 2 plain buffers:

  • Radix buffer: One or more radix trees mapping keys to their IDs. Read and write by the library.
  • Key buffer: The source of truth of full keys. Read by the library, write by the application.

An ID of a key could be an offset, or other meaningful numbers understood by the function reading a key.