aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/repository.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/repository.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/repository.rs')
-rw-r--r--crates/mozart/src/commands/repository.rs38
1 files changed, 0 insertions, 38 deletions
diff --git a/crates/mozart/src/commands/repository.rs b/crates/mozart/src/commands/repository.rs
index 7b5b7a3..5bb3db7 100644
--- a/crates/mozart/src/commands/repository.rs
+++ b/crates/mozart/src/commands/repository.rs
@@ -76,8 +76,6 @@ pub async fn execute(
}
}
-// ─── list ─────────────────────────────────────────────────────────────────────
-
fn execute_list(
args: &RepositoryArgs,
cli: &super::Cli,
@@ -130,8 +128,6 @@ fn execute_list(
Ok(())
}
-// ─── add ──────────────────────────────────────────────────────────────────────
-
fn execute_add(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()> {
let name = args
.name
@@ -192,8 +188,6 @@ fn execute_add(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()> {
Ok(())
}
-// ─── remove ───────────────────────────────────────────────────────────────────
-
fn execute_remove(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()> {
let name = args
.name
@@ -228,8 +222,6 @@ fn execute_remove(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()>
Ok(())
}
-// ─── set-url ──────────────────────────────────────────────────────────────────
-
fn execute_set_url(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()> {
let name = args
.name
@@ -261,8 +253,6 @@ fn execute_set_url(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()
}
}
-// ─── get-url ──────────────────────────────────────────────────────────────────
-
fn execute_get_url(
args: &RepositoryArgs,
cli: &super::Cli,
@@ -296,8 +286,6 @@ fn execute_get_url(
}
}
-// ─── disable ──────────────────────────────────────────────────────────────────
-
fn execute_disable(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()> {
let name = args.name.as_deref().unwrap_or("packagist.org");
@@ -318,8 +306,6 @@ fn execute_disable(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()
Ok(())
}
-// ─── enable ───────────────────────────────────────────────────────────────────
-
fn execute_enable(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()> {
let name = args.name.as_deref().unwrap_or("packagist.org");
@@ -346,8 +332,6 @@ fn execute_enable(args: &RepositoryArgs, cli: &super::Cli) -> anyhow::Result<()>
Ok(())
}
-// ─── Tests ────────────────────────────────────────────────────────────────────
-
#[cfg(test)]
mod tests {
use super::*;
@@ -376,8 +360,6 @@ mod tests {
super::super::Cli::parse_from(["mozart", "repository", "list"])
}
- // ── list ────────────────────────────────────────────────────────────────
-
#[tokio::test]
async fn test_list_empty() {
let dir = tempfile::TempDir::new().unwrap();
@@ -427,8 +409,6 @@ mod tests {
assert!(result.is_ok());
}
- // ── add ─────────────────────────────────────────────────────────────────
-
#[tokio::test]
async fn test_add_type_url() {
let dir = tempfile::TempDir::new().unwrap();
@@ -650,8 +630,6 @@ mod tests {
assert!(result.is_err());
}
- // ── remove ──────────────────────────────────────────────────────────────
-
#[tokio::test]
async fn test_remove() {
let dir = tempfile::TempDir::new().unwrap();
@@ -728,8 +706,6 @@ mod tests {
assert!(result.is_err());
}
- // ── set-url ─────────────────────────────────────────────────────────────
-
#[tokio::test]
async fn test_set_url() {
let dir = tempfile::TempDir::new().unwrap();
@@ -804,8 +780,6 @@ mod tests {
assert_eq!(json["repositories"][0]["url"], "https://new.com");
}
- // ── get-url ─────────────────────────────────────────────────────────────
-
#[tokio::test]
async fn test_get_url() {
let dir = tempfile::TempDir::new().unwrap();
@@ -839,8 +813,6 @@ mod tests {
assert!(result.is_err());
}
- // ── disable ─────────────────────────────────────────────────────────────
-
#[tokio::test]
async fn test_disable_packagist() {
let dir = tempfile::TempDir::new().unwrap();
@@ -894,8 +866,6 @@ mod tests {
assert!(result.is_err());
}
- // ── enable ──────────────────────────────────────────────────────────────
-
#[tokio::test]
async fn test_enable_packagist() {
let dir = tempfile::TempDir::new().unwrap();
@@ -929,8 +899,6 @@ mod tests {
assert!(result.is_err());
}
- // ── Composer associative-key format ─────────────────────────────────────
-
#[tokio::test]
async fn test_list_composer_format() {
let dir = tempfile::TempDir::new().unwrap();
@@ -1062,8 +1030,6 @@ mod tests {
assert!(json.get("repositories").is_none());
}
- // ── normalize_repositories helper ────────────────────────────────────────
-
#[test]
fn test_normalize_repositories_array_passthrough() {
use super::super::config_helpers::normalize_repositories;
@@ -1109,8 +1075,6 @@ mod tests {
assert!(result.is_empty());
}
- // ── unknown action ──────────────────────────────────────────────────────
-
#[tokio::test]
async fn test_unknown_action() {
let dir = tempfile::TempDir::new().unwrap();
@@ -1126,8 +1090,6 @@ mod tests {
assert!(result.is_err());
}
- // ── insert_repository helper ────────────────────────────────────────────
-
#[test]
fn test_insert_before() {
let mut json = serde_json::json!({