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

Closed
opened 2026-03-03 02:13:12 +03:00 by kerem · 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 ```
kerem closed this issue 2026-03-03 02:13:12 +03:00
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.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#1894
No description provided.