From c60c7851a8bf35e3559d15f055765b657de0ea7c Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Thu, 5 Feb 2026 15:03:52 -0700 Subject: [PATCH] refactor(api): restrict visibility of internal items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - content: DEFAULT_WEIGHT, DEFAULT_WEIGHT_HIGH → pub(crate) - sitemap: SitemapEntry → pub(crate) These items are implementation details not exposed to consumers. --- src/content.rs | 4 ++-- src/sitemap.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content.rs b/src/content.rs index fcd8111..dfc47e2 100644 --- a/src/content.rs +++ b/src/content.rs @@ -7,10 +7,10 @@ use std::fs; use std::path::{Path, PathBuf}; /// Default weight for content items in navigation and listings. -pub const DEFAULT_WEIGHT: i64 = 50; +pub(crate) const DEFAULT_WEIGHT: i64 = 50; /// High default weight for content that should appear last (e.g., projects). -pub const DEFAULT_WEIGHT_HIGH: i64 = 99; +pub(crate) const DEFAULT_WEIGHT_HIGH: i64 = 99; /// The type of content being processed. #[derive(Debug, Clone, PartialEq)] diff --git a/src/sitemap.rs b/src/sitemap.rs index 7fcc547..d00b9d5 100644 --- a/src/sitemap.rs +++ b/src/sitemap.rs @@ -6,7 +6,7 @@ use crate::escape::xml_escape; use std::path::Path; /// A URL entry for the sitemap. -pub struct SitemapEntry { +pub(crate) struct SitemapEntry { /// Absolute URL (e.g., "https://example.com/blog/post.html") pub loc: String, /// Optional last modification date in W3C format (YYYY-MM-DD)