Files
rust/library
bors 27733d46d7 Auto merge of #130887 - Soveu:repeatn, r=scottmcm
Safer implementation of RepeatN

I've seen the "Use MaybeUninit for RepeatN" commit while reading This Week In Rust and immediately thought about something I've written some time ago - https://github.com/Soveu/repeat_finite/blob/master/src/lib.rs.

Using the fact, that `Option` will find niche in `(T, NonZeroUsize)`, we can construct something that has the same size as `(T, usize)` while completely getting rid of `MaybeUninit`.
This leaves only `unsafe` on `TrustedLen`, which is pretty neat.
2025-06-18 03:18:10 +00:00
..
2025-06-16 07:00:13 +00:00
2025-06-12 07:59:13 +00:00
2025-05-01 20:01:43 +05:30
2025-05-07 13:08:19 +08:00
2025-06-08 02:36:58 +00:00