From 432472808051cb4f1bb9517b858dbc810aaa5a63 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 25 Jul 2026 16:16:33 +0900 Subject: refactor: replace redundant clones with moves Co-Authored-By: Claude Opus 5 --- crates/shirabe/src/util/forgejo.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'crates/shirabe/src/util/forgejo.rs') diff --git a/crates/shirabe/src/util/forgejo.rs b/crates/shirabe/src/util/forgejo.rs index 3a51be52..41d0dd3d 100644 --- a/crates/shirabe/src/util/forgejo.rs +++ b/crates/shirabe/src/util/forgejo.rs @@ -46,10 +46,8 @@ impl Forgejo { self.io.write_error3(&url, true, io_interface::NORMAL); let (local_auth_name, has_local_auth, auth_name): (String, bool, String) = { let cfg = self.config.borrow(); - let local = cfg - .get_local_auth_config_source() - .map(|s| s.get_name().to_string()); - let auth = cfg.get_auth_config_source().get_name().to_string(); + let local = cfg.get_local_auth_config_source().map(|s| s.get_name()); + let auth = cfg.get_auth_config_source().get_name(); (local.clone().unwrap_or_default(), local.is_some(), auth) }; let local_prefix = if has_local_auth { @@ -150,8 +148,8 @@ impl Forgejo { .remove_config_setting(&setting_key)?; } let value = shirabe_php_shim::PhpMixed::Array(indexmap::indexmap! { - "username".to_string() => username.clone().into(), - "token".to_string() => token.clone().into(), + "username".to_string() => username.into(), + "token".to_string() => token.into(), }); if store_in_local_auth_config && has_local_auth { let mut cfg = self.config.borrow_mut(); -- cgit v1.3.1