summaryrefslogtreecommitdiff
path: root/keystore2/legacykeystore
diff options
context:
space:
mode:
authorChris Wailes <chriswailes@google.com>2022-08-11 15:00:51 -0700
committerChris Wailes <chriswailes@google.com>2022-08-12 10:36:10 -0700
commit263de9f8d7d94679a5f0dd32b0654321262bf86f (patch)
tree06960a0e631789b441403bb428507c8de31f3a2f /keystore2/legacykeystore
parenta00741ceb6fff4ab670fa3942c030254efcf8769 (diff)
downloadsecurity-263de9f8d7d94679a5f0dd32b0654321262bf86f.tar.gz
Update source for Rust 1.63.0
Test: m rust Bug: 241303140 Change-Id: I3b4d8c1c3101941258e366279bfd2a4a3ab1b948
Diffstat (limited to 'keystore2/legacykeystore')
-rw-r--r--keystore2/legacykeystore/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/keystore2/legacykeystore/lib.rs b/keystore2/legacykeystore/lib.rs
index e2d952d9..95f917ae 100644
--- a/keystore2/legacykeystore/lib.rs
+++ b/keystore2/legacykeystore/lib.rs
@@ -108,6 +108,12 @@ impl DB {
.prepare("SELECT alias FROM profiles WHERE owner = ? ORDER BY alias ASC;")
.context("In list: Failed to prepare statement.")?;
+ // This allow is necessary to avoid the following error:
+ //
+ // error[E0597]: `stmt` does not live long enough
+ //
+ // See: https://github.com/rust-lang/rust-clippy/issues/8114
+ #[allow(clippy::let_and_return)]
let aliases = stmt
.query_map(params![caller_uid], |row| row.get(0))?
.collect::<rusqlite::Result<Vec<String>>>()
@@ -172,7 +178,7 @@ impl DB {
/// This is the main LegacyKeystore error type, it wraps binder exceptions and the
/// LegacyKeystore errors.
-#[derive(Debug, thiserror::Error, PartialEq)]
+#[derive(Debug, thiserror::Error, PartialEq, Eq)]
pub enum Error {
/// Wraps a LegacyKeystore error code.
#[error("Error::Error({0:?})")]