From 6980fbf2f9fb4c599d8dc6ff549a8b3288eb24e9 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 17 Aug 2026 02:29:30 +0800 Subject: refactor!: remove dynamic dispatcher registration API Dispatchers are now always registered at compile time, removing the `with_dispatcher` / `with_dispatchers` methods and the `PathfinderConfig` API. The `dispatch_tree` feature now only controls the matching strategy (trie vs linear list). --- mingling_core/src/build/pathf.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'mingling_core/src/build/pathf.rs') diff --git a/mingling_core/src/build/pathf.rs b/mingling_core/src/build/pathf.rs index 23d3910..4b8af1b 100644 --- a/mingling_core/src/build/pathf.rs +++ b/mingling_core/src/build/pathf.rs @@ -1,6 +1,5 @@ #![allow(unused_imports)] -pub use mingling_pathf::config::*; pub use mingling_pathf::module_pathf::*; pub use mingling_pathf::pattern_analyzer::*; pub use mingling_pathf::patterns::*; @@ -37,10 +36,7 @@ pub fn analyze_and_build_type_mapping_for( crate_dir: &Path, output_dir: &Path, ) -> Result<(), crate::error::MinglingPathfinderError> { - let config = mingling_pathf::config::PathfinderConfig { - use_dispatch_tree: cfg!(feature = "dispatch_tree"), - }; - mingling_pathf::analyze_and_build_type_mapping_for(crate_dir, output_dir, &config) + mingling_pathf::analyze_and_build_type_mapping_for(crate_dir, output_dir) } /// # Analyzes and builds a type mapping @@ -81,9 +77,6 @@ pub fn analyze_and_build_type_mapping_for( /// ``` pub fn analyze_and_build_type_mapping() -> Result<(), crate::error::MinglingPathfinderError> { - let config = mingling_pathf::config::PathfinderConfig { - use_dispatch_tree: cfg!(feature = "dispatch_tree"), - }; let crate_dir = std::env::current_dir().map_err(crate::error::MinglingPathfinderError::IoError)?; let crate_name = std::env::var("CARGO_PKG_NAME").map_err(|_| { @@ -99,7 +92,7 @@ pub fn analyze_and_build_type_mapping() -> Result<(), crate::error::MinglingPath )) })?; let output_dir = Path::new(&out_dir).join(&crate_name); - mingling_pathf::analyze_and_build_type_mapping_for(&crate_dir, &output_dir, &config)?; + mingling_pathf::analyze_and_build_type_mapping_for(&crate_dir, &output_dir)?; println!("cargo:rerun-if-changed=src/"); Ok(()) } -- cgit