X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/83e8dbfff2a6fdce785af58dbb13f007c4234cf2..a3a64118702b4f75691de78d42256c306f286014:/workspace/src/part05.rs?ds=sidebyside 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 {