Unused variable: data #25

Closed
opened 2025-11-07 06:19:15 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @Peneheals on GitHub (Jul 4, 2018).

A usual Gitlab build output produces:

 ---> Running in 7ffe886a95d1
   Compiling bitwarden_rs v0.9.0 (file:///app)
warning: unused variable: `data`
   --> src/api/core/mod.rs:111:37
    |
111 | fn clear_device_token(uuid: String, data: Json<Value>, headers: Headers, conn: DbConn) -> EmptyResult {
    |                                     ^^^^ help: consider using `_data` instead
    |
    = note: #[warn(unused_variables)] on by default

warning: unused variable: `data`
   --> src/api/core/mod.rs:127:35
    |
127 | fn put_device_token(uuid: String, data: Json<Value>, headers: Headers, conn: DbConn) -> JsonResult {
    |                                   ^^^^ help: consider using `_data` instead

    Finished release [optimized] target(s) in 43.63s
Removing intermediate container 7ffe886a95d1```

Is it a bug on our side or in the code? It doesn't break anything, it's just a "fyi" issue.
Originally created by @Peneheals on GitHub (Jul 4, 2018). A usual Gitlab build output produces: ```Step 18/28 : RUN cargo build --release ---> Running in 7ffe886a95d1 Compiling bitwarden_rs v0.9.0 (file:///app) warning: unused variable: `data` --> src/api/core/mod.rs:111:37 | 111 | fn clear_device_token(uuid: String, data: Json<Value>, headers: Headers, conn: DbConn) -> EmptyResult { | ^^^^ help: consider using `_data` instead | = note: #[warn(unused_variables)] on by default warning: unused variable: `data` --> src/api/core/mod.rs:127:35 | 127 | fn put_device_token(uuid: String, data: Json<Value>, headers: Headers, conn: DbConn) -> JsonResult { | ^^^^ help: consider using `_data` instead Finished release [optimized] target(s) in 43.63s Removing intermediate container 7ffe886a95d1``` Is it a bug on our side or in the code? It doesn't break anything, it's just a "fyi" issue.
Author
Owner

@dani-garcia commented on GitHub (Jul 4, 2018):

This should be solved now, it was caused by an earlier PR that removed some uneeded prints, so the variables became unused. Thanks for letting me know!

@dani-garcia commented on GitHub (Jul 4, 2018): This should be solved now, it was caused by an earlier PR that removed some uneeded prints, so the variables became unused. Thanks for letting me know!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#25