X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/ab7f9b241429bd675b437d2437799de75d2f409b..9f9b301fd5e86ae4b8cf743f80a129e4addb3635:/src/part05.rs diff --git a/src/part05.rs b/src/part05.rs index eaad980..49e57db 100644 --- a/src/part05.rs +++ b/src/part05.rs @@ -47,11 +47,11 @@ impl BigInt { } } - // We can convert any vector of digits 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. + // 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. //