mirror of https://github.com/01-edu/public.git
docs(how_many_references) correct grammar
This commit is contained in:
parent
6db1756201
commit
b3589b813d
|
@ -2,17 +2,11 @@
|
|||
|
||||
### Instructions
|
||||
|
||||
Create the following **functions** :
|
||||
Create the following **functions**:
|
||||
|
||||
- `add_ele` which adds an element to the value in the `Node`
|
||||
- `how_many_references` which returns how many times the value is referenced in the code
|
||||
- `rm_all_ref` which receives a `Rc<String>` and removes all elements from the vector that
|
||||
are equal to that value, this should only happen if the two Rcs point to the same allocation
|
||||
|
||||
### Notions
|
||||
|
||||
- [Reference Counted Smart Pointer](https://doc.rust-lang.org/book/ch15-04-rc.html)
|
||||
- [Struct std::rc::Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html)
|
||||
- `add_ele`: which adds an element to the value in the `Node`.
|
||||
- `how_many_references`: which returns how many times the value is referenced in the code.
|
||||
- `rm_all_ref`: which accepts an `Rc<String>` and removes all elements from the vector that are equal to that value. This should only happen if the two `Rc`s point to the same allocation.
|
||||
|
||||
### Expected Functions and structures
|
||||
|
||||
|
@ -78,3 +72,8 @@ b: 2
|
|||
c: 2
|
||||
$
|
||||
```
|
||||
|
||||
### Notions
|
||||
|
||||
- [Reference Counted Smart Pointer](https://doc.rust-lang.org/book/ch15-04-rc.html)
|
||||
- [Struct std::rc::Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html)
|
||||
|
|
Loading…
Reference in New Issue