[GH-ISSUE #4476] Build failure: redundant imports #34846

Closed
opened 2026-07-13 19:34:16 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @yonas on GitHub (Apr 6, 2024).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4476

$ cargo build --features sqlite --release
...
error: the item `jsonwebtoken` is imported redundantly
 --> src/auth.rs:7:20
  |
7 | use jsonwebtoken::{self, errors::ErrorKind, Algorithm, DecodingKey, EncodingKey, Header};
  |                    ^^^^ the item `jsonwebtoken` is already defined by prelude
  |
  = note: `-D unused-imports` implied by `-D unused`
  = help: to override `-D unused` add `#[allow(unused_imports)]`

error: the item `serde_json` is imported redundantly
   --> src/util.rs:561:18
    |
561 | use serde_json::{self, Value};
    |                  ^^^^
    |
   ::: src/main.rs:20:1
    |
20  | extern crate serde_json;
    | ------------------------ the item `serde_json` is already imported here

error: could not compile `vaultwarden` (bin "vaultwarden") due to 2 previous errors
Originally created by @yonas on GitHub (Apr 6, 2024). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4476 ``` $ cargo build --features sqlite --release ... error: the item `jsonwebtoken` is imported redundantly --> src/auth.rs:7:20 | 7 | use jsonwebtoken::{self, errors::ErrorKind, Algorithm, DecodingKey, EncodingKey, Header}; | ^^^^ the item `jsonwebtoken` is already defined by prelude | = note: `-D unused-imports` implied by `-D unused` = help: to override `-D unused` add `#[allow(unused_imports)]` error: the item `serde_json` is imported redundantly --> src/util.rs:561:18 | 561 | use serde_json::{self, Value}; | ^^^^ | ::: src/main.rs:20:1 | 20 | extern crate serde_json; | ------------------------ the item `serde_json` is already imported here error: could not compile `vaultwarden` (bin "vaultwarden") due to 2 previous errors ```
Author
Owner

@BlackDex commented on GitHub (Apr 6, 2024):

This is already addressed in #4475.

<!-- gh-comment-id:2040988431 --> @BlackDex commented on GitHub (Apr 6, 2024): This is already addressed in #4475.
Author
Owner

@BlackDex commented on GitHub (Apr 6, 2024):

Also as a side note, this does not happen with stable Rust which is what we support as our maximum Rust version.

<!-- gh-comment-id:2040989252 --> @BlackDex commented on GitHub (Apr 6, 2024): Also as a side note, this does not happen with stable Rust which is what we support as our maximum Rust version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#34846