Skip to content

Commit 0d2f664

Browse files
matkladCentril
andauthored
Apply suggestions from code review
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
1 parent c2fddcc commit 0d2f664

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

text/0000-standard-lazy-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static BACKTRACE: Lazy<Option<String>> = Lazy::new(|| {
2222
[motivation]: #motivation
2323

2424
Working with lazy initialized values is ubiquitous, [`lazy_static`] and [`lazycell`] crates have more than 20 million downloads combined.
25-
Although some of the popularity of `lazy_static` can be attributed to current limitations of constant evaluation in Rust, there are many cases when even perfect const fn can't replace lazy values.
25+
Although some of the popularity of `lazy_static` can be attributed to current limitations of constant evaluation in Rust, there are many cases when even perfect `const fn` can't replace lazy values.
2626

2727
At the same time, working with lazy values in Rust is not easy:
2828

@@ -333,7 +333,7 @@ type OnceCell<T> = OnceFlipCell<(), T>;
333333

334334
That is, we can store some initial state in the cell and consume it during initialization.
335335
In practice, such flexibility seems to be rarely required.
336-
Even if we add a type, similar to `OnceFlipCell`, having a dedicated `OnceCell` (which *could* be implemented on top of `OnceFlipCell`) type simplifies common use-case.
336+
Even if we add a type, similar to `OnceFlipCell`, having a dedicated `OnceCell` (which *could* be implemented on top of `OnceFlipCell`) type simplifies a common use-case.
337337

338338
## Poisoning
339339

@@ -380,7 +380,7 @@ There are two drawbacks of using fn pointer type:
380380
## Only thread-safe flavor
381381

382382
It is possible to add only `sync` version of the types, as they are the most useful.
383-
However, this will be against zero cost abstractions spirit.
383+
However, this would be against zero cost abstractions spirit.
384384
Additionally, non thread-safe version is required to replace `thread_local!` macro without imposing synchronization.
385385

386386
# Prior art

0 commit comments

Comments
 (0)