From ff4d137ae8e7a6f126d845084009ebdfc990aa47 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 7 Jul 2015 13:22:38 +0200 Subject: [PATCH] part 05: clarify exercise --- src/part05.rs | 2 +- workspace/src/part05.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/part05.rs b/src/part05.rs index 7324d13..b3b428e 100644 --- a/src/part05.rs +++ b/src/part05.rs @@ -111,7 +111,7 @@ impl Clone for SomethingOrNothing { //@ `#[derive(Clone)]` right before the definition of `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? +// digits? The number of non-zero digits? The smallest/largest digit? Of course, these should all just borrow `self`. // ## Mutation + aliasing considered harmful (part 2) //@ Now that we know how to borrow a part of an `enum` (like `v` above), there's another example for why we diff --git a/workspace/src/part05.rs b/workspace/src/part05.rs index d3c9544..f1c5587 100644 --- a/workspace/src/part05.rs +++ b/workspace/src/part05.rs @@ -59,7 +59,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? +// digits? The number of non-zero digits? The smallest/largest digit? Of course, these should all just borrow `self`. // ## Mutation + aliasing considered harmful (part 2) enum Variant { -- 2.30.2