X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/83e8dbfff2a6fdce785af58dbb13f007c4234cf2..7df9cdaae2db9969c8b83c4c69ccc21eb0973eb4:/workspace/src/part05.rs?ds=inline diff --git a/workspace/src/part05.rs b/workspace/src/part05.rs index 65f6f7d..28c4030 100644 --- a/workspace/src/part05.rs +++ b/workspace/src/part05.rs @@ -61,7 +61,7 @@ impl Clone for SomethingOrNothing { } // **Exercise 05.2**: Write some more functions on `BigInt`. What about a function that returns the number of -// digits? The number of non-zero digits? The smallest/largest digit? Of course, these should all just borrow `self`. +// digits? The number of non-zero digits? The smallest/largest digit? Of course, these should all take `self` as a shared reference (i.e., in borrowed form). // ## Mutation + aliasing considered harmful (part 2) enum Variant {