feat: rustc and clippy linting
Some checks failed
ci/woodpecker/pr/server-audit Pipeline was successful
ci/woodpecker/pr/server-vet Pipeline failed
ci/woodpecker/pr/server-lint Pipeline failed
ci/woodpecker/pr/server-test Pipeline was successful

This commit is contained in:
CleverWild
2026-04-10 00:42:43 +02:00
parent 62dff3f810
commit f6a0c32b9d
69 changed files with 1491 additions and 979 deletions

View File

@@ -13,7 +13,7 @@ use tonic::Status;
use tracing::warn;
use crate::actors::{
client::session::{ClientSession, Error, HandleQueryVaultState},
client::session::{ClientSession, ClientSessionError, HandleQueryVaultState},
keyholder::KeyHolderState,
};
@@ -28,12 +28,14 @@ pub(super) async fn dispatch(
};
match payload {
VaultRequestPayload::QueryState(_) => {
VaultRequestPayload::QueryState(()) => {
let state = match actor.ask(HandleQueryVaultState {}).await {
Ok(KeyHolderState::Unbootstrapped) => ProtoVaultState::Unbootstrapped,
Ok(KeyHolderState::Sealed) => ProtoVaultState::Sealed,
Ok(KeyHolderState::Unsealed) => ProtoVaultState::Unsealed,
Err(SendError::HandlerError(Error::Internal)) => ProtoVaultState::Error,
Err(SendError::HandlerError(ClientSessionError::Internal)) => {
ProtoVaultState::Error
}
Err(err) => {
warn!(error = ?err, "Failed to query vault state");
ProtoVaultState::Error