summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-10-15 08:04:07 +0200
committerJunio C Hamano <gitster@pobox.com>2025-10-15 08:10:17 -0700
commit03f3900fb27099366771f54cec6acd558493a4db (patch)
tree81d6090de07fee2278ec599e66fee4c147505e49 /tree-diff.c
parente75cd059001ab49bd92040418660bcdfc7981c84 (diff)
rust/varint: add safety comments
The `decode_varint()` and `encode_varint()` functions in our Rust crate are reimplementations of the respective C functions. As such, we are naturally forced to use the same interface in both Rust and C, which makes use of raw pointers. The consequence is that the code needs to be marked as unsafe in Rust. It is common practice in Rust to provide safety documentation for every block that is marked as unsafe. This common practice is also enforced by Clippy, Rust's static analyser. We don't have Clippy wired up yet, and we could of course just disable this check. But we're about to wire it up, and it is reasonable to always enforce documentation for unsafe blocks. Add such safety comments to already squelch those warnings now. While at it, also document the functions' behaviour. Helped-by: "brian m. carlson" <sandals@crustytoothpaste.net> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-diff.c')
0 files changed, 0 insertions, 0 deletions