remove as_str() legacy wrappers, callers use .into() directly

This commit is contained in:
damocles 2026-09-11 21:55:04 +02:00
commit 46456f75ce
25 changed files with 46 additions and 128 deletions

View file

@ -215,7 +215,7 @@ impl DeliveryKind {
format!(
"{}{ROUTE_PREFIX}{}",
public_base.trim_end_matches('/'),
self.as_str()
<&str>::from(self)
)
}
@ -229,18 +229,6 @@ impl DeliveryKind {
fn parse(segment: &str) -> Option<Self> {
segment.parse().ok()
}
/// Stable string form, used for logging. Deliberately the same spelling
/// as the path segment so a journal line can be matched against a
/// registered URL.
///
/// ⚠️ **Not the routing key for the swarm→hive message.** That message is
/// semantic (*knowledge repo changed*, *deploy agent X at rev Y*) and is
/// addressed to the hives that need it; which hook a delivery arrived on
/// is an input to deriving it, not the thing sent.
fn as_str(self) -> &'static str {
self.into()
}
}
/// Why a delivery was refused.
@ -377,7 +365,7 @@ pub(super) async fn post_webhook_forge(
};
tracing::info!(
kind = kind.as_str(),
kind = <&str>::from(kind),
bytes = body.len(),
"webhook: verified delivery"
);