From 03b487f0f93ac32835149d4c1a0fb420341134f8 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 10 Aug 2026 16:30:20 +0800 Subject: 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 --- mingling_pathf/src/config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mingling_pathf/src/config.rs') diff --git a/mingling_pathf/src/config.rs b/mingling_pathf/src/config.rs index 1199b2c..758aa34 100644 --- a/mingling_pathf/src/config.rs +++ b/mingling_pathf/src/config.rs @@ -17,7 +17,8 @@ pub struct PathfinderConfig { impl PathfinderConfig { /// Create a config with `use_dispatch_tree` enabled. - pub fn with_dispatch_tree() -> Self { + #[must_use] + pub const fn with_dispatch_tree() -> Self { Self { use_dispatch_tree: true, } -- cgit