Skip to content

Commit 2958fcd

Browse files
committed
simple-linked-list: fix hints.md
Closes #413. I still don't know what the underlying root cause of this error is; a variety of Markdown renderers have all struggled on the same line, and each has produced a different output. The one thing all the output has in common is that it's wrong. Luckily, we don't need to know what's precisely wrong with this in order to be able to fix it. This version should be much easier to render consistently and correctly.
1 parent 70ecf1c commit 2958fcd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

exercises/simple-linked-list/.meta/hints.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct Node<T> {
1717
```
1818
`data` contains the stored data, and `next` points to the following node (if available) or None.
1919

20-
### Why Option<__Box__<Node<T>>> and not just Option<Node<T>>?
20+
### Why `Option<Box<Node<T>>>` and not just `Option<Node<T>>`?
2121
Try it on your own. You will get the following error.
2222

2323
```
@@ -27,8 +27,7 @@ Try it on your own. You will get the following error.
2727
| next: Option<Node<T>>,
2828
| --------------------- recursive without indirection
2929
```
30-
30+
3131
The problem is that at compile time the size of next must be known.
3232
Since `next` is recursive ("a node has a node has a node..."), the compiler does not know how much memory is to be allocated.
3333
In contrast, [Box](https://doc.rust-lang.org/std/boxed/) is a heap pointer with a defined size.
34-

exercises/simple-linked-list/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct Node<T> {
4040
```
4141
`data` contains the stored data, and `next` points to the following node (if available) or None.
4242

43-
### Why Option<__Box__<Node<T>>> and not just Option<Node<T>>?
43+
### Why `Option<Box<Node<T>>>` and not just `Option<Node<T>>`?
4444
Try it on your own. You will get the following error.
4545

4646
```
@@ -50,11 +50,11 @@ Try it on your own. You will get the following error.
5050
| next: Option<Node<T>>,
5151
| --------------------- recursive without indirection
5252
```
53-
53+
5454
The problem is that at compile time the size of next must be known.
5555
Since `next` is recursive ("a node has a node has a node..."), the compiler does not know how much memory is to be allocated.
5656
In contrast, [Box](https://doc.rust-lang.org/std/boxed/) is a heap pointer with a defined size.
57-
57+
5858

5959
## Rust Installation
6060

0 commit comments

Comments
 (0)