diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-05 17:29:12 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-05 17:29:12 +0900 |
| commit | 49b0884701a84731652fc934d428932ff6029bd4 (patch) | |
| tree | 7477029b8ed686b9b3b06d960cab2b54ba87b579 /crates/mozart/src/commands/outdated.rs | |
| parent | 4623874d1c95414dcd5ae194d2561f2d98b40982 (diff) | |
| download | php-mozart-49b0884701a84731652fc934d428932ff6029bd4.tar.gz php-mozart-49b0884701a84731652fc934d428932ff6029bd4.tar.zst php-mozart-49b0884701a84731652fc934d428932ff6029bd4.zip | |
chore: remove redundant comments
Diffstat (limited to 'crates/mozart/src/commands/outdated.rs')
| -rw-r--r-- | crates/mozart/src/commands/outdated.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/crates/mozart/src/commands/outdated.rs b/crates/mozart/src/commands/outdated.rs index 61a1e8b..5f77315 100644 --- a/crates/mozart/src/commands/outdated.rs +++ b/crates/mozart/src/commands/outdated.rs @@ -66,8 +66,6 @@ pub struct OutdatedArgs { pub ignore_platform_reqs: bool, } -// ─── Core types ──────────────────────────────────────────────────────────── - #[derive(Debug, Clone, Copy, PartialEq, Eq)] enum UpdateCategory { UpToDate, @@ -95,8 +93,6 @@ struct OutdatedEntry { is_direct: bool, } -// ─── Main entry point ─────────────────────────────────────────────────────── - pub async fn execute( args: &OutdatedArgs, cli: &super::Cli, @@ -233,8 +229,6 @@ pub async fn execute( Ok(()) } -// ─── Package loading ──────────────────────────────────────────────────────── - fn load_installed_packages(working_dir: &Path, no_dev: bool) -> anyhow::Result<Vec<PackageInfo>> { let vendor_dir = working_dir.join("vendor"); let installed = mozart_registry::installed::InstalledPackages::read(&vendor_dir)?; @@ -321,8 +315,6 @@ fn load_locked_packages(working_dir: &Path, no_dev: bool) -> anyhow::Result<Vec< Ok(packages) } -// ─── Version fetching ──────────────────────────────────────────────────────── - async fn fetch_latest_version( name: &str, repo_cache: &mozart_registry::cache::Cache, @@ -342,8 +334,6 @@ async fn fetch_latest_version( }) } -// ─── Classification ────────────────────────────────────────────────────────── - /// Determine the update category for a package. /// /// Mirrors Composer's logic: constructs `^<installed_version>` and checks if the @@ -422,8 +412,6 @@ fn extract_patch(version_normalized: &str) -> u64 { .unwrap_or(0) } -// ─── Level filtering ───────────────────────────────────────────────────────── - /// Check whether a version change passes the --major-only/--minor-only/--patch-only filter. /// /// Returns true if the version change matches the requested level. @@ -449,8 +437,6 @@ fn passes_level_filter(args: &OutdatedArgs, current: &str, latest: &str) -> bool true } -// ─── Rendering ─────────────────────────────────────────────────────────────── - fn render_text(entries: &[OutdatedEntry], console: &mozart_core::console::Console) { use mozart_core::console::Verbosity; @@ -537,8 +523,6 @@ fn render_json( Ok(()) } -// ─── Helpers ───────────────────────────────────────────────────────────────── - /// Returns true if the given package name is a platform package (php, ext-*, etc.). fn is_platform_package(name: &str) -> bool { let lower = name.to_lowercase(); @@ -575,14 +559,10 @@ fn normalize_version_simple(version: &str) -> String { result } -// ─── Tests ─────────────────────────────────────────────────────────────────── - #[cfg(test)] mod tests { use super::*; - // ── classify_update ────────────────────────────────────────────────────── - #[test] fn test_classify_up_to_date_equal() { let cat = classify_update("1.2.3.0", "1.2.3.0"); @@ -630,8 +610,6 @@ mod tests { assert_eq!(cat, UpdateCategory::SemverCompatible); } - // ── passes_level_filter ────────────────────────────────────────────────── - fn make_args_with_filter(major: bool, minor: bool, patch: bool) -> OutdatedArgs { OutdatedArgs { package: None, @@ -695,8 +673,6 @@ mod tests { assert!(!passes_level_filter(&args, "1.0.1.0", "1.0.1.0")); } - // ── normalize_version_simple ────────────────────────────────────────────── - #[test] fn test_normalize_version_simple_short() { assert_eq!(normalize_version_simple("1.2"), "1.2.0.0"); @@ -722,8 +698,6 @@ mod tests { assert_eq!(normalize_version_simple("1.2.3-beta1"), "1.2.3.0-beta1"); } - // ── extract_major/minor/patch ───────────────────────────────────────────── - #[test] fn test_extract_major() { assert_eq!(extract_major("2.3.4.0"), 2); @@ -743,8 +717,6 @@ mod tests { assert_eq!(extract_patch("1.2.0.0"), 0); } - // ── is_platform_package ─────────────────────────────────────────────────── - #[test] fn test_is_platform_package() { assert!(is_platform_package("php")); @@ -755,8 +727,6 @@ mod tests { assert!(!is_platform_package("psr/log")); } - // ── render_json (smoke test with no network) ────────────────────────────── - fn test_console() -> mozart_core::console::Console { mozart_core::console::Console { interactive: false, |
