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