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

@ -21,12 +21,6 @@ pub enum StateArg {
Closed,
}
impl StateArg {
fn as_str(self) -> &'static str {
self.into()
}
}
#[derive(ClapArgs)]
pub struct Args {
/// Issue (or PR — shares the same `/issues/<n>` endpoint) number.
@ -74,7 +68,7 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
due_date: None,
milestone: args.milestone.map(index).transpose()?,
r#ref: None,
state: args.state.map(|s| s.as_str().to_owned()),
state: args.state.map(|s| <&str>::from(s).to_owned()),
title: args.title,
unset_due_date: None,
updated_at: None,