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/show.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/show.rs')
| -rw-r--r-- | crates/mozart/src/commands/show.rs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/crates/mozart/src/commands/show.rs b/crates/mozart/src/commands/show.rs index 6c72540..c07ffb1 100644 --- a/crates/mozart/src/commands/show.rs +++ b/crates/mozart/src/commands/show.rs @@ -197,8 +197,6 @@ pub async fn execute( execute_installed(args, &working_dir, &repo_cache, console).await } -// ─── Installed mode ──────────────────────────────────────────────────────── - async fn execute_installed( args: &ShowArgs, working_dir: &Path, @@ -781,8 +779,6 @@ fn show_installed_package_detail( Ok(()) } -// ─── Locked mode ─────────────────────────────────────────────────────────── - async fn execute_locked( args: &ShowArgs, working_dir: &Path, @@ -1239,8 +1235,6 @@ fn show_locked_package_detail( Ok(()) } -// ─── Self mode ───────────────────────────────────────────────────────────── - fn show_self( args: &ShowArgs, working_dir: &Path, @@ -1336,8 +1330,6 @@ fn show_self( Ok(()) } -// ─── Tree mode ───────────────────────────────────────────────────────────── - fn show_tree( args: &ShowArgs, working_dir: &Path, @@ -1528,8 +1520,6 @@ fn is_platform_package(name: &str) -> bool { || lower == "composer-runtime-api" } -// ─── Platform mode ───────────────────────────────────────────────────────── - fn show_platform( args: &ShowArgs, working_dir: &Path, @@ -1648,8 +1638,6 @@ fn show_platform( Ok(()) } -// ─── Available mode ───────────────────────────────────────────────────────── - async fn show_available( args: &ShowArgs, working_dir: &Path, @@ -1847,8 +1835,6 @@ async fn show_available_versions_inline( } } -// ─── Helper functions ────────────────────────────────────────────────────── - /// Format version string for display: strip leading 'v' for text output. fn format_version(version: &str) -> String { version.strip_prefix('v').unwrap_or(version).to_string() @@ -1955,14 +1941,10 @@ fn normalize_version_simple(version: &str) -> String { result } -// ─── Tests ───────────────────────────────────────────────────────────────── - #[cfg(test)] mod tests { use super::*; - // ── format_license_for_show ───────────────────────────────────────────── - #[test] fn test_format_license_for_show_osi_approved() { let out = format_license_for_show("MIT"); @@ -2006,8 +1988,6 @@ mod tests { ); } - // ── format_version ────────────────────────────────────────────────────── - #[test] fn test_format_version_strips_v() { assert_eq!(format_version("v1.2.3"), "1.2.3"); @@ -2023,8 +2003,6 @@ mod tests { assert_eq!(format_version("dev-main"), "dev-main"); } - // ── matches_wildcard ───────────────────────────────────────────────────── - #[test] fn test_matches_wildcard_exact() { assert!(matches_wildcard("psr/log", "psr/log")); @@ -2071,16 +2049,12 @@ mod tests { assert!(!matches_wildcard("psr/log", "psr/l")); } - // ── format_version_highlight ──────────────────────────────────────────── - #[test] fn test_format_version_highlight() { assert_eq!(format_version_highlight("v3.0.0"), "* 3.0.0"); assert_eq!(format_version_highlight("3.0.0"), "* 3.0.0"); } - // ── get_installed_description ──────────────────────────────────────────── - #[test] fn test_get_installed_description_present() { use std::collections::BTreeMap; @@ -2122,8 +2096,6 @@ mod tests { assert_eq!(get_installed_description(&pkg), ""); } - // ── get_installed_keywords ─────────────────────────────────────────────── - #[test] fn test_get_installed_keywords() { use std::collections::BTreeMap; @@ -2147,8 +2119,6 @@ mod tests { assert_eq!(get_installed_keywords(&pkg), "log, psr3, logging"); } - // ── is_platform_package ─────────────────────────────────────────────────── - #[test] fn test_is_platform_package_php() { assert!(is_platform_package("php")); @@ -2171,8 +2141,6 @@ mod tests { assert!(!is_platform_package("psr/log")); } - // ── classify_update_category ───────────────────────────────────────────── - #[test] fn test_classify_up_to_date() { assert_eq!( @@ -2197,8 +2165,6 @@ mod tests { ); } - // ── normalize_version_simple ────────────────────────────────────────────── - #[test] fn test_normalize_version_simple_short() { assert_eq!(normalize_version_simple("1.2"), "1.2.0.0"); @@ -2214,8 +2180,6 @@ mod tests { assert_eq!(normalize_version_simple("v1.2.3"), "1.2.3.0"); } - // ── extract_major ───────────────────────────────────────────────────────── - #[test] fn test_extract_major_basic() { assert_eq!(extract_major("2.3.4.0"), 2); |
