Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vhost-device-sound: pipewire: Fix rand module imports #808

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

dorindabassey
Copy link
Contributor

@dorindabassey dorindabassey commented Feb 7, 2025

Summary of the PR

This commit updates rand imports to use rand::distr instead of rand::distributions, ensuring compatibility with the latest rand crate version. the commit also replaces rand::thread_rng() with rand::rng() to reflect API changes in rand and handle errors when creating a Uniform<f32> distribution.

depends on:
#803

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

@epilys
Copy link
Member

epilys commented Feb 8, 2025

@dorindabassey @stefano-garzarella I think instead of basing this PR on #803, you should base it on main, update rand and the API use just for the pipewire tests, merge this, and then make dependabot regenerate the update deps PR. This way CI stays passing at every step

This commit updates rand dependencies and rand imports
to use `rand::distr` instead of `rand::distributions`,
ensuring compatibility with the latest rand crate
version. the commit also replaces `rand::thread_rng()`
with `rand::rng()` to reflect API changes in `rand`
and handle errors when creating a `Uniform<f32>`
distribution.

Signed-off-by: Dorinda Bassey <[email protected]>
@epilys epilys merged commit 7dbd5ed into rust-vmm:main Feb 12, 2025
2 checks passed
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.

3 participants