add unreachable_pub lint, fix all 17 violations
pub → pub(crate) for SseReader methods (used across child modules). pub → pub(super) for openai::stream_events, tool definitions, store helpers. pub → private for normalize_link and differentiate_hub_with_graph (only used within their own files). Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
af3929cc65
commit
b0e852a05f
7 changed files with 15 additions and 15 deletions
|
|
@ -23,7 +23,7 @@ pub struct MemoryUnit {
|
|||
pub source_ref: Option<String>,
|
||||
}
|
||||
|
||||
pub fn classify_filename(filename: &str) -> NodeType {
|
||||
pub(super) fn classify_filename(filename: &str) -> NodeType {
|
||||
let bare = filename.strip_suffix(".md").unwrap_or(filename);
|
||||
if bare.starts_with("daily-") { NodeType::EpisodicDaily }
|
||||
else if bare.starts_with("weekly-") { NodeType::EpisodicWeekly }
|
||||
|
|
@ -147,7 +147,7 @@ fn extract_md_links(content: &str, re: &Regex, source_file: &str) -> Vec<String>
|
|||
.collect()
|
||||
}
|
||||
|
||||
pub fn normalize_link(target: &str, source_file: &str) -> String {
|
||||
fn normalize_link(target: &str, source_file: &str) -> String {
|
||||
let source_bare = source_file.strip_suffix(".md").unwrap_or(source_file);
|
||||
|
||||
if target.starts_with('#') {
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ pub struct GapRecord {
|
|||
}
|
||||
|
||||
/// Per-node agent visit index: node_key → (agent_type → last_visit_timestamp)
|
||||
pub type VisitIndex = HashMap<String, HashMap<String, i64>>;
|
||||
pub(super) type VisitIndex = HashMap<String, HashMap<String, i64>>;
|
||||
|
||||
// The full in-memory store
|
||||
#[derive(Default, Serialize, Deserialize)]
|
||||
|
|
@ -557,7 +557,7 @@ capnp_message!(AgentVisit,
|
|||
skip: [],
|
||||
);
|
||||
|
||||
pub fn new_visit(node_uuid: [u8; 16], node_key: &str, agent: &str, outcome: &str) -> AgentVisit {
|
||||
pub(super) fn new_visit(node_uuid: [u8; 16], node_key: &str, agent: &str, outcome: &str) -> AgentVisit {
|
||||
AgentVisit {
|
||||
node_uuid,
|
||||
node_key: node_key.to_string(),
|
||||
|
|
@ -588,7 +588,7 @@ capnp_message!(TranscriptSegment,
|
|||
skip: [],
|
||||
);
|
||||
|
||||
pub fn new_transcript_segment(transcript_id: &str, segment_index: u32, agent: &str) -> TranscriptSegment {
|
||||
pub(super) fn new_transcript_segment(transcript_id: &str, segment_index: u32, agent: &str) -> TranscriptSegment {
|
||||
TranscriptSegment {
|
||||
transcript_id: transcript_id.to_string(),
|
||||
segment_index,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue