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/package/package.rs | 66 +++++++++++++++++------------------ 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'crates/shirabe/src/package/package.rs') 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, - pub(crate) r#type: Option, - pub(crate) target_dir: Option, + r#type: Option, + target_dir: Option, /// `'source'` | `'dist'` | `null` - pub(crate) installation_source: Option, - pub(crate) source_type: Option, - pub(crate) source_url: Option, - pub(crate) source_reference: Option, - pub(crate) source_mirrors: Option>, - pub(crate) dist_type: Option, - pub(crate) dist_url: Option, - pub(crate) dist_reference: Option, - pub(crate) dist_sha1_checksum: Option, - pub(crate) dist_mirrors: Option>, - pub(crate) version: String, - pub(crate) pretty_version: String, - pub(crate) release_date: Option>, - pub(crate) extra: IndexMap, - pub(crate) binaries: Vec, - pub(crate) dev: bool, + installation_source: Option, + source_type: Option, + source_url: Option, + source_reference: Option, + source_mirrors: Option>, + dist_type: Option, + dist_url: Option, + dist_reference: Option, + dist_sha1_checksum: Option, + dist_mirrors: Option>, + version: String, + pretty_version: String, + release_date: Option>, + extra: IndexMap, + binaries: Vec, + dev: bool, /// `'stable'` | `'RC'` | `'beta'` | `'alpha'` | `'dev'` - pub(crate) stability: String, - pub(crate) notification_url: Option, - - pub(crate) requires: IndexMap, - pub(crate) conflicts: IndexMap, - pub(crate) provides: IndexMap, - pub(crate) replaces: IndexMap, - pub(crate) dev_requires: IndexMap, - pub(crate) suggests: IndexMap, - pub(crate) autoload: IndexMap, - pub(crate) dev_autoload: IndexMap, - pub(crate) include_paths: Vec, - pub(crate) is_default_branch: bool, - pub(crate) transport_options: IndexMap, - pub(crate) php_ext: Option>, + stability: String, + notification_url: Option, + + requires: IndexMap, + conflicts: IndexMap, + provides: IndexMap, + replaces: IndexMap, + dev_requires: IndexMap, + suggests: IndexMap, + autoload: IndexMap, + dev_autoload: IndexMap, + include_paths: Vec, + is_default_branch: bool, + transport_options: IndexMap, + php_ext: Option>, } impl Package { -- cgit v1.3.1-4-g156e