Commit f40d825
authored
Rollup merge of #149305 - tisonkun:oncecell-simplify, r=chenyukang
Simplify OnceCell Clone impl
Noticed when developing fast/mea#79.
This may also apply to `OnceLock`. But unfortunately, we can't construct a completed `Once` beforehand.
Note that `OnceCell::from` is marked as [`rustc_const_unstable`](#143773) so we don't need an extra `const fn from_value` to leverage possible const convert benefit.1 file changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
385 | 382 | | |
386 | | - | |
387 | 383 | | |
388 | 384 | | |
389 | 385 | | |
| |||
0 commit comments