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

clippy: fix TryFrom/TryInto warnings #279

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

hackaugusto
Copy link
Contributor

Describe your changes

The 2021 prelude includes TryFrom and TryInto [1]. And recently the nigtlhy channel started linting for this duplicated imports and emitting warnings. This removes the redundant imports.

1: https://doc.rust-lang.org/core/prelude/rust_2021/index.html


Here is an example warning:

warning: the item `TryInto` is imported redundantly
   --> src/hash/rescue/rpo/mod.rs:7:12
    |
7   | use core::{convert::TryInto, ops::Range};
    |            ^^^^^^^^^^^^^^^^
    |
   ::: /Users/hack/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:129:13
    |
129 |     pub use core::prelude::rust_2021::*;
    |             ------------------------ the item `TryInto` is already defined here

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.

Copy link

sonarcloud bot commented Feb 21, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@hackaugusto hackaugusto merged commit 1f2c920 into next Feb 21, 2024
9 of 10 checks passed
@hackaugusto hackaugusto deleted the hacka-fix-tryfrom-tryinto branch February 21, 2024 15:13
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.

2 participants