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

tests: Warn on clippy::as_conversions #4161

Conversation

JonathanWoollett-Light
Copy link
Contributor

Changes

See below.

Reason

clippy::ptr_as_ptr, clippy::cast_lossless,
clippy::cast_possible_truncation, clippy::cast_possible_wrap and clippy::cast_sign_loss are all enabled by clippy::as_conversions, with them all enabled we can now remove them and simply warn on clippy::as_conversions.

Closes #3161.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet contribution quality standards.

  • This functionality cannot be added in rust-vmm.

@JonathanWoollett-Light JonathanWoollett-Light added the Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` label Oct 9, 2023
@JonathanWoollett-Light JonathanWoollett-Light self-assigned this Oct 9, 2023
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (5a6f28d) 82.98% compared to head (9e27796) 82.98%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4161   +/-   ##
=======================================
  Coverage   82.98%   82.98%           
=======================================
  Files         223      223           
  Lines       28508    28508           
=======================================
  Hits        23656    23656           
  Misses       4852     4852           
Flag Coverage Δ
4.14-c7g.metal 78.51% <ø> (ø)
4.14-m5d.metal 80.32% <ø> (ø)
4.14-m6a.metal 79.45% <ø> (ø)
4.14-m6g.metal 78.51% <ø> (ø)
4.14-m6i.metal 80.30% <ø> (ø)
5.10-c7g.metal 81.44% <ø> (ø)
5.10-m5d.metal 83.00% <ø> (ø)
5.10-m6a.metal 82.24% <ø> (ø)
5.10-m6g.metal 81.44% <ø> (ø)
5.10-m6i.metal 82.98% <ø> (ø)
6.1-c7g.metal 81.44% <ø> (ø)
6.1-m5d.metal 83.00% <ø> (-0.02%) ⬇️
6.1-m6a.metal 82.24% <ø> (ø)
6.1-m6g.metal 81.44% <ø> (ø)
6.1-m6i.metal 82.99% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/net_gen/src/if_tun.rs 62.18% <ø> (ø)
src/net_gen/src/iff.rs 65.19% <ø> (ø)
src/virtio_gen/src/virtio_net.rs 68.54% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

`clippy::ptr_as_ptr`, `clippy::cast_lossless`,
`clippy::cast_possible_truncation`, `clippy::cast_possible_wrap` and
`clippy::cast_sign_loss` are all enabled by `clippy::as_conversions`,
with them all enabled we can now remove them and simply warn on
`clippy::as_conversions`.

Signed-off-by: Jonathan Woollett-Light <[email protected]>
@roypat
Copy link
Contributor

roypat commented Oct 10, 2023

Seems like this needs some allows sprinkled throughout the test code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled `
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use clippy::as_conversions
2 participants