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/problem.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/shirabe/src/dependency_resolver/problem.rs') diff --git a/crates/shirabe/src/dependency_resolver/problem.rs b/crates/shirabe/src/dependency_resolver/problem.rs index 1da6028c..cdb833bf 100644 --- a/crates/shirabe/src/dependency_resolver/problem.rs +++ b/crates/shirabe/src/dependency_resolver/problem.rs @@ -25,12 +25,12 @@ use shirabe_symfony_console::formatter::OutputFormatter; #[derive(Debug)] pub struct Problem { /// A map containing the id of each rule part of this problem as a key - pub(crate) reason_seen: IndexMap, + reason_seen: IndexMap, /// A set of reasons for the problem, each is a rule or a root require and a rule - pub(crate) reasons: IndexMap>>>, + reasons: IndexMap>>>, - pub(crate) section: i64, + section: i64, } impl Default for Problem { @@ -360,7 +360,7 @@ impl Problem { } /// Store a reason descriptor but ignore duplicates - pub(crate) fn add_reason(&mut self, id: String, reason: std::rc::Rc>) { + fn add_reason(&mut self, id: String, reason: std::rc::Rc>) { // TODO: if a rule is part of a problem description in two sections, isn't this going to remove a message // that is important to understand the issue? @@ -1377,7 +1377,7 @@ impl Problem { } /// Turns a constraint into text usable in a sentence describing a request - pub(crate) fn constraint_to_text(constraint: Option<&AnyConstraint>) -> String { + fn constraint_to_text(constraint: Option<&AnyConstraint>) -> String { if let Some(c) = constraint && c.is_constraint() && c.get_operator() == Some(CmpOp::Eq) -- cgit v1.3.1-4-g156e