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

Fix vec string warnings #249

Closed

Conversation

hackaugusto
Copy link
Contributor

This builds on #248

It changes the explicit import by a wildcard. The explicit imports raised warnings:

error: the item `String` is imported redundantly
   --> utils/core/src/serde/byte_reader.rs:6:51
    |
6   | use super::{Deserializable, DeserializationError, String, Vec};
    |                                                   ^^^^^^
    |
   ::: /Users/hack/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
    |
125 |     pub use super::v1::*;
    |             --------- the item `String` is already defined here
    |
    = note: `-D unused-imports` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_imports)]`

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
@hackaugusto
Copy link
Contributor Author

hackaugusto commented Feb 21, 2024

Note: I fixed the warnings raised by the CI. But it seems the CI is only running clippy with the default feature flags:

cargo clippy --all -- -D clippy::all -D warnings

When running it with:

cargo clippy --workspace --all-targets --all-features -- -D clippy::all -D warnings

There is additional errors. The CI and the above errors should probably be fixed in another PR.

@irakliyk
Copy link
Collaborator

Closing this as these changes were also included in #250.

@irakliyk irakliyk closed this Feb 21, 2024
@hackaugusto hackaugusto deleted the fix-vec-string-warnings branch February 22, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants