Clippy at the base: allow large_enum_variant on two huginn-mind enums, drop a let-and-return

cargo clippy -D warnings failed at df7507b on PipelineDocument (masking these downstream); the two enums
are returned once per commit or request, and admission.rs resolution matrix returned a let binding. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-09 22:17:41 +02:00
commit 821bab62ac
3 changed files with 4 additions and 3 deletions

View file

@ -603,7 +603,7 @@ fn matrix(subject: PipelineKind, outcome: &ResolutionOutcome) -> bool {
use PipelineKind as K;
use ResolutionOutcome as O;
let all = |by: &[PipelineRef], kind: K| by.iter().all(|supersessor| supersessor.kind == kind);
let fits = match (subject, outcome) {
match (subject, outcome) {
(K::Target, O::Superseded { by }) => all(by, K::Target),
(K::Question, O::Answered { by }) => by.kind == K::Ruling,
(K::Question, O::Withdrawn { .. }) => true,
@ -621,8 +621,7 @@ fn matrix(subject: PipelineKind, outcome: &ResolutionOutcome) -> bool {
(K::Run, O::Recorded { .. } | O::Withdrawn { .. }) => true,
(K::Resolution, O::Withdrawn { .. }) => true,
_ => false,
};
fits
}
}
/// The resolution row: the sequence, the in-force subject, the matrix, the

View file

@ -155,6 +155,7 @@ impl HuginnCommitReceipt {
/// How a commit ended. An exact replay is decided by admission before the
/// commit is attempted, so it is not an exit of the primitive.
#[derive(Clone, Debug, PartialEq, Eq)]
#[allow(clippy::large_enum_variant, reason = "one outcome per commit, returned once and matched at once")]
pub(crate) enum CommitOutcome {
/// The batch and its receipt landed whole.
Committed(HuginnCommitReceipt),

View file

@ -102,6 +102,7 @@ impl HuginnMindRequest {
/// transport failure: the read side carries `Refused`, the write side carries
/// the outcome's own `Refused`.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
#[allow(clippy::large_enum_variant, reason = "one answer per request; a document view is the answer a reader asked for")]
pub enum HuginnMindResponse {
Whoami(MindStatus),
Admit(PipelineAdmissionOutcome),