diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-25 16:16:33 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-25 16:17:10 +0900 |
| commit | 432472808051cb4f1bb9517b858dbc810aaa5a63 (patch) | |
| tree | 4c58b97942853ea2c3f58368203fa93187746cf8 /crates/shirabe/src/util/forgejo.rs | |
| parent | d4608662f28b9a5135986b1702afe3199957eabe (diff) | |
| download | php-shirabe-432472808051cb4f1bb9517b858dbc810aaa5a63.tar.gz php-shirabe-432472808051cb4f1bb9517b858dbc810aaa5a63.tar.zst php-shirabe-432472808051cb4f1bb9517b858dbc810aaa5a63.zip | |
refactor: replace redundant clones with moves
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/forgejo.rs')
| -rw-r--r-- | crates/shirabe/src/util/forgejo.rs | 10 |
1 files changed, 4 insertions, 6 deletions
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(); |
