diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-17 02:29:30 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-17 02:39:56 +0800 |
| commit | 6980fbf2f9fb4c599d8dc6ff549a8b3288eb24e9 (patch) | |
| tree | bc7049698955d7a40706ea691fd5bab526a6b5e5 /mingling_core/src/build | |
| parent | 4c191b2b46a67a0dda6e9a867b40f45156af4f9c (diff) | |
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).
Diffstat (limited to 'mingling_core/src/build')
| -rw-r--r-- | mingling_core/src/build/pathf.rs | 11 |
1 files changed, 2 insertions, 9 deletions
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(()) } |
