From 95ea3ceef5006c277605dd15a5f320e30e05e882 Mon Sep 17 00:00:00 2001 From: Charisee Date: Wed, 27 Mar 2024 23:45:23 +0000 Subject: [PATCH] Update needed for Rust v1.77.0 error: field `0` is never read --> system/security/keystore2/src/database.rs:848:31 | 848 | pub struct PerBootDbKeepAlive(Connection); | ------------------ ^^^^^^^^^^ | | | field in this struct | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` help: consider changing the field to be of unit type to suppress this warning wh ile preserving the field numbering, or remove the field | 848 | pub struct PerBootDbKeepAlive(()); | ~~ error: aborting due to 1 previous error Bug: 330185853 ./test_compiler.py --prebuilt-path dist/rust-dev.tar.xz --target aosp_cf_x86_64_phone --image Test: m rust Change-Id: I4cb81c955372c4f8f50b940b389f2d7cfc5d3ce9 --- keystore2/src/database.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/keystore2/src/database.rs b/keystore2/src/database.rs index f343cb33..113c049b 100644 --- a/keystore2/src/database.rs +++ b/keystore2/src/database.rs @@ -845,6 +845,7 @@ impl AuthTokenEntry { /// Shared in-memory databases get destroyed as soon as the last connection to them gets closed. /// This object does not allow access to the database connection. But it keeps a database /// connection alive in order to keep the in memory per boot database alive. +#[allow(dead_code)] pub struct PerBootDbKeepAlive(Connection); impl KeystoreDB {