diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-29 04:17:51 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-29 04:24:14 +0900 |
| commit | f33487739aa9af2f40df678db2e418788a66e634 (patch) | |
| tree | b5456508d0ef8cf8d784fe99345a6a5f6e5cb561 /crates/shirabe/src/package/root_alias_package.rs | |
| parent | 633a250e3039d766af3ed5733fe9b825b994511c (diff) | |
| download | php-shirabe-f33487739aa9af2f40df678db2e418788a66e634.tar.gz php-shirabe-f33487739aa9af2f40df678db2e418788a66e634.tar.zst php-shirabe-f33487739aa9af2f40df678db2e418788a66e634.zip | |
feat(package): implement RootAliasPackage root getters via owned returns
It is faithful to PHP's by-value array/string semantics.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/package/root_alias_package.rs')
| -rw-r--r-- | crates/shirabe/src/package/root_alias_package.rs | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/crates/shirabe/src/package/root_alias_package.rs b/crates/shirabe/src/package/root_alias_package.rs index 41b30a9..4a4115d 100644 --- a/crates/shirabe/src/package/root_alias_package.rs +++ b/crates/shirabe/src/package/root_alias_package.rs @@ -53,32 +53,28 @@ impl std::fmt::Display for RootAliasPackage { } impl RootPackageInterface for RootAliasPackage { - fn get_aliases(&self) -> &[IndexMap<String, String>] { - todo!("RootAliasPackage::get_aliases cannot return a borrow across the aliasOf handle") + fn get_aliases(&self) -> Vec<IndexMap<String, String>> { + self.alias_of.get_aliases() } - fn get_minimum_stability(&self) -> &str { - todo!( - "RootAliasPackage::get_minimum_stability cannot return &str across the aliasOf handle" - ) + fn get_minimum_stability(&self) -> String { + self.alias_of.get_minimum_stability() } - fn get_stability_flags(&self) -> &IndexMap<String, i64> { - todo!( - "RootAliasPackage::get_stability_flags cannot return a borrow across the aliasOf handle" - ) + fn get_stability_flags(&self) -> IndexMap<String, i64> { + self.alias_of.get_stability_flags() } - fn get_references(&self) -> &IndexMap<String, String> { - todo!("RootAliasPackage::get_references cannot return a borrow across the aliasOf handle") + fn get_references(&self) -> IndexMap<String, String> { + self.alias_of.get_references() } fn get_prefer_stable(&self) -> bool { self.alias_of.get_prefer_stable() } - fn get_config(&self) -> &IndexMap<String, PhpMixed> { - todo!("RootAliasPackage::get_config cannot return a borrow across the aliasOf handle") + fn get_config(&self) -> IndexMap<String, PhpMixed> { + self.alias_of.get_config() } fn set_requires(&mut self, requires: IndexMap<String, Link>) { |
