From b3589b813d2ca4c168a4b2b5f606a4bbba7530da Mon Sep 17 00:00:00 2001 From: davhojt Date: Fri, 3 Jun 2022 15:08:17 +0300 Subject: [PATCH] docs(how_many_references) correct grammar --- subjects/how_many_references/README.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/subjects/how_many_references/README.md b/subjects/how_many_references/README.md index f0029e7d..e800de15 100644 --- a/subjects/how_many_references/README.md +++ b/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` 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` 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)