We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fbbf20a + 76cac7d commit 53b14f4Copy full SHA for 53b14f4
src/custom_types/enum/testcase_linked_list.md
@@ -38,6 +38,7 @@ impl List {
38
match *self {
39
// Can't take ownership of the tail, because `self` is borrowed;
40
// instead take a reference to the tail
41
+ // And it'a a non-tail recursive call which may cause stack overflow for long lists.
42
Cons(_, ref tail) => 1 + tail.len(),
43
// Base Case: An empty list has zero length
44
Nil => 0
0 commit comments