Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Fix clippy with latest nightly #32

Merged
merged 2 commits into from
Feb 27, 2024
Merged

Fix clippy with latest nightly #32

merged 2 commits into from
Feb 27, 2024

Conversation

Nashtare
Copy link
Member

Description

Latest versions of the compiler broke clippy runs by warning about redundant imports, cf:

error: the item `String` is imported redundantly
    --> src/lib.rs:1640:17
     |
1640 |     use utils::{String, ToOwned};
     |                 ^^^^^^
     |
    ::: /Users/nashtare/.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

To alleviate this, we fully exclude the use of the std prelude by marking the library as #![no_std], and then import std conditionally through extern crate std;.
Additionally, some actual redundant imports were not caught previously and have been cleaned up altogether.

@Nashtare Nashtare self-assigned this Feb 27, 2024
@Nashtare Nashtare added the bug Something isn't working label Feb 27, 2024
Copy link
Member

@LindaGuiga LindaGuiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Nashtare Nashtare merged commit 5622087 into main Feb 27, 2024
6 of 7 checks passed
@Nashtare Nashtare deleted the clippy branch February 27, 2024 09:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants