From 0802fd44ed11283f15900d2993fc495acf1bed01 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 9 May 2026 14:44:26 +0900 Subject: refactor(commands): consolidate get_platform_requirement_filter into shared module Removes the per-command duplicate implementations of get_platform_requirement_filter from dump_autoload and reinstall, and lifts a single canonical version into commands.rs. --- crates/mozart-registry/src/cache.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/mozart-registry/src') diff --git a/crates/mozart-registry/src/cache.rs b/crates/mozart-registry/src/cache.rs index 3ba3258..39e3e8d 100644 --- a/crates/mozart-registry/src/cache.rs +++ b/crates/mozart-registry/src/cache.rs @@ -298,7 +298,7 @@ impl Cache { /// Each top-level subdirectory is one bare mirror keyed by sanitized URL. /// Deletes entire subdirectories whose mtime is older than `ttl_seconds`. /// Mirrors Composer's `Cache::gcVcsCache`. - pub fn gc_vcs(&self, ttl_seconds: u64) -> anyhow::Result<()> { + pub fn gc_vcs_cache(&self, ttl_seconds: u64) -> anyhow::Result<()> { if !self.enabled || !self.root.exists() { return Ok(()); } @@ -541,7 +541,7 @@ mod tests { ) .unwrap(); - cache.gc_vcs(3600).unwrap(); + cache.gc_vcs_cache(3600).unwrap(); assert!(!old_mirror.exists(), "expired mirror should be removed"); assert!(new_mirror.exists(), "fresh mirror should remain"); -- cgit v1.3.1