Rename RandomSource -> Rng, DefaultRandomSource -> SystemRng#157539
Conversation
|
r? @jhpratt rustbot has assigned @jhpratt. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
Looks like a simple change; |
|
I don't really want to bikeshed this all over again, but how about calling this |
|
@joboet |
I'm trying to figure out what the CI issue is. Currently re-running it because it's not clear to me if it's spurious or not. |
Per naming bikeshed in libs-api. `Rng` is shorter, and already established in the ecosystem. `System` makes it self-documenting that `SystemRng` gets its randomness from the system RNG.
431abc5 to
0e51988
Compare
RandomSource -> Rng, DefaultRandomSource -> SysRngRandomSource -> Rng, DefaultRandomSource -> SystemRng
|
@bors r=jhpratt rollup |
Rollup of 7 pull requests Successful merges: - #157681 (Add instrument_fn attribute) - #149219 (Allow shortening lifetime in CoerceUnsized for &mut) - #157539 (Rename `RandomSource` -> `Rng`, `DefaultRandomSource` -> `SystemRng`) - #157980 (Some minor cleanups around hir ty/pat/expr) - #157988 (Fix incremental-finalize-fail proc macro test on AIX) - #157989 (run-make: handle AIX symbol cdylib export test) - #157998 (Add big disclaimer to the description of lint `explicit_outlives_requirements`)
Rollup merge of #157539 - joshtriplett:random-source-rename, r=jhpratt Rename `RandomSource` -> `Rng`, `DefaultRandomSource` -> `SystemRng` Per naming bikeshed in libs-api. `Rng` is shorter, and already established in the ecosystem. `System` makes it self-documenting that `SystemRng` gets its randomness from the system RNG. This also makes it short and convenient to write `SystemRng.fill_bytes`, rather than `DefaultRandomSource.fill_bytes`.
Per naming bikeshed in libs-api.
Rngis shorter, and already established in the ecosystem.Systemmakes it self-documenting thatSystemRnggets its randomness from the system RNG.This also makes it short and convenient to write
SystemRng.fill_bytes, rather thanDefaultRandomSource.fill_bytes.