aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/reinstall.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-05 17:29:12 +0900
committernsfisis <nsfisis@gmail.com>2026-05-05 17:29:12 +0900
commit49b0884701a84731652fc934d428932ff6029bd4 (patch)
tree7477029b8ed686b9b3b06d960cab2b54ba87b579 /crates/mozart/src/commands/reinstall.rs
parent4623874d1c95414dcd5ae194d2561f2d98b40982 (diff)
downloadphp-mozart-49b0884701a84731652fc934d428932ff6029bd4.tar.gz
php-mozart-49b0884701a84731652fc934d428932ff6029bd4.tar.zst
php-mozart-49b0884701a84731652fc934d428932ff6029bd4.zip
chore: remove redundant comments
Diffstat (limited to 'crates/mozart/src/commands/reinstall.rs')
-rw-r--r--crates/mozart/src/commands/reinstall.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/crates/mozart/src/commands/reinstall.rs b/crates/mozart/src/commands/reinstall.rs
index e959486..7e426f8 100644
--- a/crates/mozart/src/commands/reinstall.rs
+++ b/crates/mozart/src/commands/reinstall.rs
@@ -64,8 +64,6 @@ pub struct ReinstallArgs {
pub r#type: Vec<String>,
}
-// ─── Main entry point ─────────────────────────────────────────────────────────
-
pub async fn execute(
args: &ReinstallArgs,
cli: &super::Cli,
@@ -306,8 +304,6 @@ pub async fn execute(
Ok(())
}
-// ─── Helpers ──────────────────────────────────────────────────────────────────
-
/// Filter candidates by package type (case-insensitive).
fn filter_by_type<'a>(
candidates: &[&'a mozart_registry::installed::InstalledPackageEntry],
@@ -402,15 +398,11 @@ fn find_locked_package<'a>(
.copied()
}
-// ─── Tests ───────────────────────────────────────────────────────────────────
-
#[cfg(test)]
mod tests {
use super::*;
use std::collections::BTreeMap;
- // ── Helper constructors ───────────────────────────────────────────────────
-
fn make_installed_entry(
name: &str,
pkg_type: Option<&str>,
@@ -457,8 +449,6 @@ mod tests {
}
}
- // ── glob_matches ──────────────────────────────────────────────────────────
-
#[test]
fn test_glob_exact_match() {
assert!(glob_matches("monolog/monolog", "monolog/monolog"));
@@ -500,8 +490,6 @@ mod tests {
assert!(glob_matches("monolog/monolog", "monolog/monolog"));
}
- // ── find_locked_package ───────────────────────────────────────────────────
-
#[test]
fn test_find_locked_package_found() {
let pkgs = [
@@ -533,8 +521,6 @@ mod tests {
assert!(result.is_none());
}
- // ── filter_by_type ────────────────────────────────────────────────────────
-
#[test]
fn test_filter_by_type_library() {
let e1 = make_installed_entry("psr/log", Some("library"));
@@ -581,8 +567,6 @@ mod tests {
assert_eq!(result.len(), 2);
}
- // ── filter_by_names ───────────────────────────────────────────────────────
-
#[test]
fn test_filter_by_names_exact() {
let e1 = make_installed_entry("psr/log", Some("library"));
@@ -625,8 +609,6 @@ mod tests {
assert!(result.is_empty());
}
- // ── mutual exclusion validation ───────────────────────────────────────────
-
/// Verify that the validation logic (both --type and names) is reflected in arg combinations.
/// We can't call execute() without a full environment, but we can test the logic directly.
#[test]
@@ -649,8 +631,6 @@ mod tests {
);
}
- // ── dev filtering ─────────────────────────────────────────────────────────
-
#[test]
fn test_dev_filtering_excludes_dev_packages() {
let e1 = make_installed_entry("psr/log", Some("library"));