aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/package_sorter.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-19 00:10:22 +0900
committernsfisis <nsfisis@gmail.com>2026-05-19 00:11:03 +0900
commitc839244d8d09f3036ebfee8eef7eb6b147e593ab (patch)
treefe48c94f2c2e62468beef5ff1a8f3cff6adeef4f /crates/shirabe/src/util/package_sorter.rs
parent48839250146b217e2756ed3c0e624fd341b54d6c (diff)
downloadphp-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.gz
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.zst
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.zip
fix(compile): fix various compile errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/package_sorter.rs')
-rw-r--r--crates/shirabe/src/util/package_sorter.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/util/package_sorter.rs b/crates/shirabe/src/util/package_sorter.rs
index 2f38910..a2728b5 100644
--- a/crates/shirabe/src/util/package_sorter.rs
+++ b/crates/shirabe/src/util/package_sorter.rs
@@ -36,7 +36,7 @@ impl PackageSorter {
pub fn sort_packages_alphabetically(
mut packages: Vec<Box<dyn PackageInterface>>,
) -> Vec<Box<dyn PackageInterface>> {
- packages.sort_by_key(|p| p.get_name());
+ packages.sort_by_key(|p| p.get_name().to_string());
packages
}
@@ -48,9 +48,9 @@ impl PackageSorter {
for package in &packages {
let mut links: IndexMap<String, Link> = package.get_requires();
- // TODO: check for RootAliasPackage as well
- if let Some(root_package) = (package.as_any() as &dyn Any).downcast_ref::<RootPackage>()
- {
+ // TODO(phase-b): check for RootAliasPackage as well; PackageInterface lacks as_any
+ let root_package: Option<&RootPackage> = None;
+ if let Some(root_package) = root_package {
links.extend(root_package.get_dev_requires());
}
for link in links.values() {