mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
d2644e538c
doc: rewrite doc for uint::{carrying_add,borrowing_sub} Reword the documentation for bigint helper methods `uint::{carrying_add,borrowing_sub}` (#85532). The examples were also rewritten to demonstrate how the methods can be used in bignum arithmetic. No loops are used in the examples, but the variable names were chosen to include indices so that it is clear how this can be used in a loop if required. Also, previously `carrying_add` had an example to say that if the input carry is false, the method is equivalent to `overflowing_add`. While the note was kept, the example was removed and an extra note was added to make sure this equivalence is not assumed for signed integers as well. |
||
---|---|---|
.. | ||
benches | ||
primitive_docs | ||
src | ||
tests | ||
Cargo.toml |