From 3a388b98a9aa6a14b1c7f7dc909c109cf9837800 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 16 Aug 2026 00:59:54 +0900 Subject: refactor: narrow pub(crate) items to private Porting mapped every PHP `protected` member onto `pub(crate)`, which is wider than nearly all of them need. Each item demoted here is reached only from the module that defines it, so the crate-wide visibility conveyed nothing. Every `pub(crate)` that survives has at least one reader in another module of the same crate. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/src/dependency_resolver/transaction.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/shirabe/src/dependency_resolver/transaction.rs') diff --git a/crates/shirabe/src/dependency_resolver/transaction.rs b/crates/shirabe/src/dependency_resolver/transaction.rs index 78037338..84879a41 100644 --- a/crates/shirabe/src/dependency_resolver/transaction.rs +++ b/crates/shirabe/src/dependency_resolver/transaction.rs @@ -21,18 +21,18 @@ use shirabe_php_shim::{ #[derive(Debug, Clone)] pub struct Transaction { /// @var OperationInterface[] - pub(crate) operations: Vec, + operations: Vec, /// Packages present at the beginning of the transaction /// @var PackageInterface[] - pub(crate) present_packages: Vec, + present_packages: Vec, /// Package set resulting from this transaction /// @var array - pub(crate) result_package_map: IndexMap, + result_package_map: IndexMap, /// @var array - pub(crate) result_packages_by_name: IndexMap>, + result_packages_by_name: IndexMap>, } impl Default for Transaction { @@ -104,7 +104,7 @@ impl Transaction { } } - pub(crate) fn calculate_operations(&mut self) -> Vec { + fn calculate_operations(&mut self) -> Vec { let mut operations: Vec = vec![]; let mut present_package_map: IndexMap = IndexMap::new(); @@ -218,7 +218,7 @@ impl Transaction { /// /// These serve as a starting point to enumerate packages in a topological order despite potential cycles. /// If there are packages with a cycle on the top level the package with the lowest name gets picked - pub(crate) fn get_root_packages(&self) -> IndexMap { + fn get_root_packages(&self) -> IndexMap { let mut roots: IndexMap = self .result_package_map .iter() @@ -245,7 +245,7 @@ impl Transaction { roots } - pub(crate) fn get_providers_in_result(&self, link: &Link) -> Vec { + fn get_providers_in_result(&self, link: &Link) -> Vec { let Some(packages) = self.result_packages_by_name.get(link.get_target()) else { return vec![]; }; -- cgit v1.3.1-4-g156e