Browse Source

docs(how_many_references) correct grammar

1122-buz-zinga
davhojt 2 years ago committed by Dav Hojt
parent
commit
b3589b813d
  1. 19
      subjects/how_many_references/README.md

19
subjects/how_many_references/README.md

@ -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…
Cancel
Save