Skip to content

Bump rand crate to 0.9.1 release - #10

Open
mtreinish wants to merge 1 commit into
qiskit-community:mainfrom
mtreinish:bump-rand
Open

mtreinish wants to merge 1 commit into
qiskit-community:mainfrom
mtreinish:bump-rand

Conversation

@mtreinish

Copy link
Copy Markdown
Contributor

This commit bumps the rand version to the latest release, 0.9.1. There were some API deprecations that were updated as part of this change. Additionally, there was an API change around the generation of random usize values. This is no longer supported in rand 0.9.x. So in places where that was used a random u64 is used and that is cast to a u64. This will result in a truncated value on 32 bit platforms, if support for 32 bit platforms is important we can use a config flag to adjust the size of the random integer to use a u32 on 32 bit platforms and a u64 on 64bit platforms. But since there isn't a platform support listed I figured 64bit platforms were the priority and left it as always using a u64.

@mtreinish

Copy link
Copy Markdown
Contributor Author

This will be blocked on the clippy failures too until #9 merges

This commit bumps the rand version to the latest release, 0.9.1. There
were some API deprecations that were updated as part of this change.
Additionally, there was an API change around the generation of random
usize values. This is no longer supported in rand 0.9.x. So in places
where that was used a random u64 is used and that is cast to a u64. This
will result in a truncated value on 32 bit platforms, if support for 32
bit platforms is important we can use a config flag to adjust the size
of the random integer to use a u32 on 32 bit platforms and a u64 on
64bit platforms. But since there isn't a platform support listed I
figured 64bit platforms were the priority and left it as always using a
u64.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant