X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/7c40ab364e37362f07302da9074f2cabacffe8c7..c27b94f8e36d136f81f799ca1ae205988cf3d36e:/src/part05.rs diff --git a/src/part05.rs b/src/part05.rs index adbe5c7..49e57db 100644 --- a/src/part05.rs +++ b/src/part05.rs @@ -47,12 +47,11 @@ impl BigInt { } } - // Any vector of digits, which meets the structure of BigInt's `data` field, can be easily - // converted into a big number just by removing trailing zeros. The `mut` - // declaration for `v` here is just like the one in `let mut ...`: We completely own `v`, but Rust - // still asks us to make our intention of modifying it explicit. This `mut` is *not* part of the - // type of `from_vec` - the caller has to give up ownership of `v` anyway, so they don't care anymore - // what you do to it. + // We can convert any little-endian vector of digits (i.e., least-significant digit first) into a number, + // by removing trailing zeros. The `mut` declaration for `v` here is just like the one in `let mut ...`: + // We completely own `v`, but Rust still asks us to make our intention of modifying it explicit. This + // `mut` is *not* part of the type of `from_vec` - the caller has to give up ownership of `v` anyway, so + // they don't care anymore what you do to it. // // **Exercise 05.1**: Implement this function. //