0.1.2 (older version) Thoroughness: Medium Understanding: High
by dbrgn on 2020-12-06
This review is from Crev, a distributed system for code reviews. To add your review, set up cargo-crev
.
The current version of http-auth-basic is 0.3.5.
0.1.2 (older version) Thoroughness: Medium Understanding: High
by dbrgn on 2020-12-06
Lib.rs has been able to verify that all files in the crate's tarball are in the crate's repository with a git tag matching the version. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.
To review the actual code of the crate, it's best to use cargo crev open http-auth-basic
. Alternatively, you can download the tarball of http-auth-basic v0.3.5 or view the source online.
This is a very small crate that encodes and decodes basic auth headers (which is essentially just a base64
user:password
string). It might be handy in some situations.The crate looks correct overall and is covered with tests. It could however be made more efficient, there are a lot of allocations going on that could be avoided (e.g. copying strings, taking strings instead of slices in an API, collecting parts into Vec after splitting, etc). That's not an issue at all for small, non-performance-critical projects, but it might be a minor issue if you're performance-sensitive and do a lot of authentication handling.