a constructor function
This commit is contained in:
parent
5ffe48f2d3
commit
5f507ceada
1 changed files with 6 additions and 0 deletions
|
|
@ -16,3 +16,9 @@ struct Node {
|
||||||
next: Link,
|
next: Link,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl List{
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self { head: Link::Empty }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue