diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-29 03:42:14 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-29 03:42:14 +0900 |
| commit | 86fcc80b348a3f00ab81e5447924aa10202d95e8 (patch) | |
| tree | 0bdb4f7bd11aab799230a97500a380401a93b77e /crates/shirabe/src/command/bump_command.rs | |
| parent | 7f83e785a77fbdbcada9c6714703d4e5801af82a (diff) | |
| download | php-shirabe-86fcc80b348a3f00ab81e5447924aa10202d95e8.tar.gz php-shirabe-86fcc80b348a3f00ab81e5447924aa10202d95e8.tar.zst php-shirabe-86fcc80b348a3f00ab81e5447924aa10202d95e8.zip | |
refactor(repository): introduce typed LockArrayRepositoryHandle
Share LockArrayRepository via Rc<RefCell<_>> while preserving the PHP
?LockArrayRepository type strength: Request.locked_repository, Locker
::get_locked_repository, and the installer create_* helpers now thread
the typed handle instead of an owned LockArrayRepository, and pool
builder identity check becomes a strict ptr_eq via widening into
RepositoryInterfaceHandle.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/bump_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/bump_command.rs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/crates/shirabe/src/command/bump_command.rs b/crates/shirabe/src/command/bump_command.rs index 64ec54b..b91a32a 100644 --- a/crates/shirabe/src/command/bump_command.rs +++ b/crates/shirabe/src/command/bump_command.rs @@ -143,12 +143,11 @@ impl BumpCommand { .as_bool() .unwrap_or(true); let repo: crate::repository::RepositoryInterfaceHandle = if !has_lock_file_disabled { - crate::repository::RepositoryInterfaceHandle::new( - composer - .get_locker() - .borrow_mut() - .get_locked_repository(true)?, - ) + composer + .get_locker() + .borrow_mut() + .get_locked_repository(true)? + .into() } else if composer.get_locker().borrow_mut().is_locked() { if !composer.get_locker().borrow_mut().is_fresh()? { io.write_error3( @@ -158,12 +157,11 @@ impl BumpCommand { ); return Ok(Self::ERROR_LOCK_OUTDATED); } - crate::repository::RepositoryInterfaceHandle::new( - composer - .get_locker() - .borrow_mut() - .get_locked_repository(true)?, - ) + composer + .get_locker() + .borrow_mut() + .get_locked_repository(true)? + .into() } else { composer .get_repository_manager() |
