Clean up a complex phrase

While it is semantically correct English, it makes non-english speakers brains boil out and also has some logical issues (being able to prevent data races does not logically imply memory safety of leaks). I've just removed this redundant comparison, simplifying the phrase.

Please, native English speakers chime in - it should be possible to further make this phrase better.
This commit is contained in:
Berkus Decker
2021-11-18 20:37:04 +02:00
committed by GitHub
parent 3c2ca8528c
commit 522f804e4f

View File

@@ -2,12 +2,12 @@
Rusts memory safety guarantees make it difficult, but not impossible, to
accidentally create memory that is never cleaned up (known as a *memory leak*).
Preventing memory leaks entirely is not one of Rusts guarantees in the same
way that disallowing data races at compile time is, meaning memory leaks are
memory safe in Rust. We can see that Rust allows memory leaks by using `Rc<T>`
and `RefCell<T>`: its possible to create references where items refer to each
other in a cycle. This creates memory leaks because the reference count of each
item in the cycle will never reach 0, and the values will never be dropped.
Preventing memory leaks entirely is not one of Rusts guarantees, meaning
[memory leaks][memleaks] are memory safe in Rust. We can see that Rust allows
memory leaks by using `Rc<T>` and `RefCell<T>`: its possible to create references
where items refer to each other in a cycle. This creates memory leaks because
the reference count of each item in the cycle will never reach 0, and the values
will never be dropped.
### Creating a Reference Cycle
@@ -316,3 +316,4 @@ Next, well talk about concurrency in Rust. Youll even learn about a few ne
smart pointers.
[nomicon]: ../nomicon/index.html
[memleaks]: https://en.wikipedia.org/wiki/Memory_leak