Fix test failure in the reference
This commit is contained in:
parent
a93c8b655f
commit
87c903a95c
1 changed files with 5 additions and 0 deletions
|
|
@ -1405,6 +1405,11 @@ implementations for every method, but it must specify the type `E`. Here's
|
|||
an implementation of `Container` for the standard library type `Vec`:
|
||||
|
||||
```
|
||||
# trait Container {
|
||||
# type E;
|
||||
# fn empty() -> Self;
|
||||
# fn insert(&mut self, Self::E);
|
||||
# }
|
||||
impl<T> Container for Vec<T> {
|
||||
type E = T;
|
||||
fn empty() -> Vec<T> { Vec::new() }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue