diff --git a/src/smart-pointers/exercise.md b/src/smart-pointers/exercise.md index 72bedcb7..6eb2b01a 100644 --- a/src/smart-pointers/exercise.md +++ b/src/smart-pointers/exercise.md @@ -14,10 +14,10 @@ Implement the following types, so that the given tests pass. Extra Credit: implement an iterator over a binary tree that returns the values in order. -```rust,editable +```rust,editable,ignore {{#include exercise.rs:types}} -// Implement `new`, `insert`, `len`, and `has`. +// Implement `new`, `insert`, `len`, and `has` for `Subtree`. {{#include exercise.rs:tests}} ``` diff --git a/src/smart-pointers/exercise.rs b/src/smart-pointers/exercise.rs index 9be7e3ad..bd060e79 100644 --- a/src/smart-pointers/exercise.rs +++ b/src/smart-pointers/exercise.rs @@ -35,7 +35,6 @@ struct Subtree(Option>>); pub struct BinaryTree { root: Subtree, } -// ANCHOR_END: types impl BinaryTree { fn new() -> Self { @@ -54,6 +53,7 @@ impl BinaryTree { self.root.len() } } +// ANCHOR_END: types impl Subtree { fn new() -> Self {