This review is from Crev, a distributed system for code reviews. To add your review, set up cargo-crev.

0.1.1 (current) Rating: Positive Thoroughness: Medium Understanding: High

by kpreid on 2023-10-14

Does what it says. One caveat:

  • When it says logging, it means logging, and only logging: there is no machine-readable output that might be usable in automated tests of allocation behavior.

One bug:

  • If the closure passed to run_guarded() panics, there is no cleanup and so the calling thread will never log again.

Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories. There is absolutely no guarantee that the repository URL declared by the crate belongs to the crate, or that the code in the repository is the code inside the published tarball. To review the actual code of the crate, it's best to use cargo crev open logging-allocator. Alternatively, you can download the tarball of logging-allocator v0.1.1 or view the source online.