logo

Rust crates reviews

Cryptographically verifiable, distributed dependency reviews

crate: ucs2

https://lib.rs/crates/ucs2/

Add the last reviewed version to Cargo.toml / [dependencies]:

ucs2 = "0.3.2"

Filter reviews clicking on the numbers in the summary.

Full column names in tooltip hints: rating Negative, rating Neutral, rating Positive, rating Strong, thoroughness, understanding, reviews count.

Neg
Neu
Pos
Str
tho
und
rev
6
6
2
2
2
2
2
2
crate version
rating
date
reviewer
thoroughness, understanding
ucs2 0.2.0
positive
2020-01-11
high, high

Contains unsafe code as a mechanism to eliminate bounds checks by asserting
properties with unreachable_unchecked. However, this appears to make proper
(and only proper) use of the unsafe assertion that strings are valid UTF-8
given by the standard library.

The unsafe code is documented and the reasoning behind it is explained. The
only minor flaw is that it does not properly explain that the validity
invariant used is being tested for. Since it does reference both utf-8 and
the byte length in its argument this should be straightforward to the reader
though.

A slightly cleaner way of testing the conditions might have been matching the
first byte with integer ranges, which would have eliminated the last bounds
check without an additional unreachable assertion.

No strong rating since the crate is incomplete and the trust of maintainers
is not clearly established.

© bestia.dev 2023, MIT License, Version: 2023.608.1636

Open source repository for this web app: https://github.com/bestia-dev/cargo_crev_web/