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

@ -71,17 +71,6 @@ pub enum ApprovalKind {
MergeConfigPr,
}
impl ApprovalKind {
/// Wire/UI string — the same value serde's `snake_case` rename
/// produces, via the same derive (`#[strum(serialize_all =
/// "snake_case")]`) rather than a hand-rolled match a new variant
/// could silently miss.
#[must_use]
pub fn as_str(self) -> &'static str {
self.into()
}
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum ApprovalStatus {

View file

@ -154,15 +154,6 @@ impl ToolGroup {
Self::WebTools,
];
/// The `snake_case` wire name for this group (matches `serde(rename_all =
/// "snake_case")` serialisation) — derived (`#[strum(serialize_all =
/// "snake_case")]`) from the same convention rather than a hand-written
/// match kept in sync with it by hand.
#[must_use]
pub fn as_str(self) -> &'static str {
self.into()
}
/// Short human-readable description suitable for a tooltip or help text.
#[must_use]
pub fn description(self) -> &'static str {
@ -240,14 +231,6 @@ impl Capability {
Self::QueryAgentState,
];
/// Canonical `snake_case` name for this capability (matches serde) —
/// derived rather than a hand-written match, same as
/// [`ToolGroup::as_str`].
#[must_use]
pub fn as_str(self) -> &'static str {
self.into()
}
/// Short human-readable description suitable for a tooltip or help text.
#[must_use]
pub fn description(self) -> &'static str {