aboutsummaryrefslogtreecommitdiff
path: root/mingling_pathf/test/src/lib.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-10 16:30:20 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-10 16:30:20 +0800
commit03b487f0f93ac32835149d4c1a0fb420341134f8 (patch)
tree80e3e901c054581dcffc09da471053d15eb12560 /mingling_pathf/test/src/lib.rs
parent1be60c990f27cd9006fa3db8aa5bd623c33840e8 (diff)
feat(pathf): enforce pedantic lints and update API ergonomics
- Add `#[must_use]` to public constructors and getters - Change `init_with_config` to accept `&PathfinderConfig` instead of owned value - Refactor `map_or_else` and `or_insert_with` for clippy compliance - Add `#![deny(clippy::pedantic)]` and `#![deny(clippy::nursery)]` - Document error cases in public API docs - Simplify duplicated dispatcher_clap analysis logic
Diffstat (limited to 'mingling_pathf/test/src/lib.rs')
-rw-r--r--mingling_pathf/test/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mingling_pathf/test/src/lib.rs b/mingling_pathf/test/src/lib.rs
index b543a15..95d7410 100644
--- a/mingling_pathf/test/src/lib.rs
+++ b/mingling_pathf/test/src/lib.rs
@@ -300,7 +300,7 @@ fn test_dispatcher_dispatch_tree() {
assert!(r1.contains("::sub::CMDGreet"));
// With dispatch_tree: Entry + CMD + __internal_dispatcher
- let r2 = pattern_analyzer::init_with_config(PathfinderConfig::with_dispatch_tree())
+ let r2 = pattern_analyzer::init_with_config(&PathfinderConfig::with_dispatch_tree())
.analyze_file(&file)
.unwrap();
// 8 (from above) + 2 __internal (root) + 2 __internal (sub) = 12
@@ -377,7 +377,7 @@ fn test_dispatcher_clap_dispatch_tree() {
assert_eq!(r1.len(), 26);
// With dispatch_tree: 26 + 4 __internal (root) + 3 __internal (sub, no "full") = 33
- let r2 = pattern_analyzer::init_with_config(PathfinderConfig::with_dispatch_tree())
+ let r2 = pattern_analyzer::init_with_config(&PathfinderConfig::with_dispatch_tree())
.analyze_file(&file)
.unwrap();
assert_eq!(r2.len(), 33);