From 938b44b55c077c7826569f1f720bad0ee67f79b6 Mon Sep 17 00:00:00 2001 From: inottn Date: Tue, 7 May 2024 13:00:28 +0800 Subject: [PATCH] fix: fix check error --- Cargo.lock | 1 - crates/rspack_plugin_size_limits/Cargo.toml | 1 - crates/rspack_plugin_size_limits/src/lib.rs | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cafbb74b762f..611bbe7e76fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3523,7 +3523,6 @@ dependencies = [ "rspack_core", "rspack_error", "rspack_hook", - "rspack_regex", "rspack_util", ] diff --git a/crates/rspack_plugin_size_limits/Cargo.toml b/crates/rspack_plugin_size_limits/Cargo.toml index 7dd04092beee..24351e42e3c6 100644 --- a/crates/rspack_plugin_size_limits/Cargo.toml +++ b/crates/rspack_plugin_size_limits/Cargo.toml @@ -13,5 +13,4 @@ futures = { workspace = true } rspack_core = { path = "../rspack_core" } rspack_error = { path = "../rspack_error" } rspack_hook = { path = "../rspack_hook" } -rspack_regex = { path = "../rspack_regex" } rspack_util = { path = "../rspack_util" } diff --git a/crates/rspack_plugin_size_limits/src/lib.rs b/crates/rspack_plugin_size_limits/src/lib.rs index 28987e9f99d5..9578a4f6d6b2 100644 --- a/crates/rspack_plugin_size_limits/src/lib.rs +++ b/crates/rspack_plugin_size_limits/src/lib.rs @@ -82,7 +82,7 @@ impl SizeLimitsPlugin { } fn add_assets_over_size_limit_warning( - detail: &Vec<(&String, f64)>, + detail: &[(&String, f64)], limit: f64, hints: &str, diagnostics: &mut Vec, @@ -99,7 +99,7 @@ impl SizeLimitsPlugin { } fn add_entrypoints_over_size_limit_warning( - detail: &Vec<(&String, f64, Vec)>, + detail: &[(&String, f64, Vec)], limit: f64, hints: &str, diagnostics: &mut Vec, @@ -159,7 +159,7 @@ async fn after_emit(&self, compilation: &mut Compilation) -> Result<()> { for (name, ukey) in compilation.entrypoints.iter() { let entry = compilation.chunk_group_by_ukey.expect_get(ukey); - let size = self.get_entrypoint_size(entry, &compilation).await; + let size = self.get_entrypoint_size(entry, compilation).await; if size > max_entrypoint_size { let mut files = vec![];