From 49b0884701a84731652fc934d428932ff6029bd4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 5 May 2026 17:29:12 +0900 Subject: chore: remove redundant comments --- crates/mozart-archiver/src/lib.rs | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'crates/mozart-archiver/src/lib.rs') diff --git a/crates/mozart-archiver/src/lib.rs b/crates/mozart-archiver/src/lib.rs index 19889ef..575f024 100644 --- a/crates/mozart-archiver/src/lib.rs +++ b/crates/mozart-archiver/src/lib.rs @@ -5,8 +5,6 @@ use std::fs; use std::io::Write as IoWrite; use std::path::{Path, PathBuf}; -// ─── Exclude filters ───────────────────────────────────────────────────────── - /// A compiled exclude pattern derived from a gitignore-style rule. pub struct ExcludePattern { regex: Regex, @@ -132,8 +130,6 @@ fn apply_filters( excluded } -// ─── GitExcludeFilter ───────────────────────────────────────────────────────── - /// Parse `.gitattributes` from the source directory. /// /// Returns exclude patterns for lines containing `export-ignore` or @@ -174,8 +170,6 @@ pub fn parse_gitattributes(source_dir: &Path) -> Vec { patterns } -// ─── ComposerExcludeFilter ──────────────────────────────────────────────────── - /// Convert `composer.json` `archive.exclude` rules into exclude patterns. pub fn parse_composer_excludes(excludes: &[String]) -> Vec { excludes @@ -184,12 +178,8 @@ pub fn parse_composer_excludes(excludes: &[String]) -> Vec { .collect() } -// ─── VCS directory names ────────────────────────────────────────────────────── - const VCS_DIRS: &[&str] = &[".git", ".svn", ".hg", "CVS", ".bzr"]; -// ─── File collection ────────────────────────────────────────────────────────── - /// Collect all archivable files from the source directory. /// /// Returns paths relative to `source_dir`, sorted for deterministic output. @@ -276,8 +266,6 @@ fn collect_recursive( Ok(()) } -// ─── Archive formats ────────────────────────────────────────────────────────── - /// Supported archive formats. #[derive(Debug, Clone, PartialEq, Eq)] pub enum ArchiveFormat { @@ -310,8 +298,6 @@ impl ArchiveFormat { } } -// ─── Archive creation ───────────────────────────────────────────────────────── - /// Create an archive of the given files. /// /// - `source_dir`: the root of the source tree @@ -430,8 +416,6 @@ fn create_tar_bz2(source_dir: &Path, files: &[PathBuf], target: &Path) -> anyhow Ok(()) } -// ─── Filename generation ────────────────────────────────────────────────────── - /// Generate an archive filename (without extension) for a package. /// /// Mirrors Composer's `ArchiveManager::getPackageFilenameParts()`. @@ -492,8 +476,6 @@ pub fn generate_archive_filename( .join("-") } -// ─── Self-exclusion patterns ────────────────────────────────────────────────── - /// The set of archive extensions we support. const ARCHIVE_EXTENSIONS: &[&str] = &["zip", "tar", "tar.gz", "tar.bz2"]; @@ -514,14 +496,11 @@ pub fn self_exclusion_patterns(base_name: &str, has_extra_parts: bool) -> Vec