aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/package/package.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-16 00:59:54 +0900
committernsfisis <nsfisis@gmail.com>2026-08-16 01:03:45 +0900
commit3a388b98a9aa6a14b1c7f7dc909c109cf9837800 (patch)
tree593e342313c6e6bd3ec2943a1690b8798e0a83ae /crates/shirabe/src/package/package.rs
parentaad468e8b75ffc3e87ea6dfa22c53a8299fc08da (diff)
downloadphp-shirabe-3a388b98a9aa6a14b1c7f7dc909c109cf9837800.tar.gz
php-shirabe-3a388b98a9aa6a14b1c7f7dc909c109cf9837800.tar.zst
php-shirabe-3a388b98a9aa6a14b1c7f7dc909c109cf9837800.zip
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/package/package.rs')
-rw-r--r--crates/shirabe/src/package/package.rs64
1 files changed, 32 insertions, 32 deletions
diff --git a/crates/shirabe/src/package/package.rs b/crates/shirabe/src/package/package.rs
index ee1a5e10..4e35ee55 100644
--- a/crates/shirabe/src/package/package.rs
+++ b/crates/shirabe/src/package/package.rs
@@ -31,41 +31,41 @@ pub struct Package {
/// Back-reference to the owning repository. `Weak` breaks the repository -> packages cycle.
repository: Option<RepositoryInterfaceWeakHandle>,
- pub(crate) r#type: Option<String>,
- pub(crate) target_dir: Option<String>,
+ r#type: Option<String>,
+ target_dir: Option<String>,
/// `'source'` | `'dist'` | `null`
- pub(crate) installation_source: Option<String>,
- pub(crate) source_type: Option<String>,
- pub(crate) source_url: Option<String>,
- pub(crate) source_reference: Option<String>,
- pub(crate) source_mirrors: Option<Vec<Mirror>>,
- pub(crate) dist_type: Option<String>,
- pub(crate) dist_url: Option<String>,
- pub(crate) dist_reference: Option<String>,
- pub(crate) dist_sha1_checksum: Option<String>,
- pub(crate) dist_mirrors: Option<Vec<Mirror>>,
- pub(crate) version: String,
- pub(crate) pretty_version: String,
- pub(crate) release_date: Option<chrono::DateTime<chrono::Utc>>,
- pub(crate) extra: IndexMap<String, PhpMixed>,
- pub(crate) binaries: Vec<String>,
- pub(crate) dev: bool,
+ installation_source: Option<String>,
+ source_type: Option<String>,
+ source_url: Option<String>,
+ source_reference: Option<String>,
+ source_mirrors: Option<Vec<Mirror>>,
+ dist_type: Option<String>,
+ dist_url: Option<String>,
+ dist_reference: Option<String>,
+ dist_sha1_checksum: Option<String>,
+ dist_mirrors: Option<Vec<Mirror>>,
+ version: String,
+ pretty_version: String,
+ release_date: Option<chrono::DateTime<chrono::Utc>>,
+ extra: IndexMap<String, PhpMixed>,
+ binaries: Vec<String>,
+ dev: bool,
/// `'stable'` | `'RC'` | `'beta'` | `'alpha'` | `'dev'`
- pub(crate) stability: String,
- pub(crate) notification_url: Option<String>,
+ stability: String,
+ notification_url: Option<String>,
- pub(crate) requires: IndexMap<String, Link>,
- pub(crate) conflicts: IndexMap<String, Link>,
- pub(crate) provides: IndexMap<String, Link>,
- pub(crate) replaces: IndexMap<String, Link>,
- pub(crate) dev_requires: IndexMap<String, Link>,
- pub(crate) suggests: IndexMap<String, String>,
- pub(crate) autoload: IndexMap<String, PhpMixed>,
- pub(crate) dev_autoload: IndexMap<String, PhpMixed>,
- pub(crate) include_paths: Vec<String>,
- pub(crate) is_default_branch: bool,
- pub(crate) transport_options: IndexMap<String, PhpMixed>,
- pub(crate) php_ext: Option<IndexMap<String, PhpMixed>>,
+ requires: IndexMap<String, Link>,
+ conflicts: IndexMap<String, Link>,
+ provides: IndexMap<String, Link>,
+ replaces: IndexMap<String, Link>,
+ dev_requires: IndexMap<String, Link>,
+ suggests: IndexMap<String, String>,
+ autoload: IndexMap<String, PhpMixed>,
+ dev_autoload: IndexMap<String, PhpMixed>,
+ include_paths: Vec<String>,
+ is_default_branch: bool,
+ transport_options: IndexMap<String, PhpMixed>,
+ php_ext: Option<IndexMap<String, PhpMixed>>,
}
impl Package {