diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-02 04:22:30 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-02 04:22:30 +0800 |
| commit | 8128f2c94313b2e9b9d0b5c3350623f77bbb2521 (patch) | |
| tree | 9e542eeaaae148b8cccaa01608d75ed1fc463869 /mingling_pathf/src/module_pathf.rs | |
| parent | 3f24e5b6ead1e153408ae5e58ad34636fe614645 (diff) | |
chore: run cargo fmt and rearrange re-exports in minglingnext
Diffstat (limited to 'mingling_pathf/src/module_pathf.rs')
| -rw-r--r-- | mingling_pathf/src/module_pathf.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mingling_pathf/src/module_pathf.rs b/mingling_pathf/src/module_pathf.rs index d06be9b..c20fd82 100644 --- a/mingling_pathf/src/module_pathf.rs +++ b/mingling_pathf/src/module_pathf.rs @@ -10,7 +10,6 @@ use crate::error::MinglingPathfinderError; /// effective module path (e.g., `crate::foo::bar`). #[derive(Debug, Clone)] pub struct MappingItem { - /// The path of the source file (relative to the crate root, with `./` prefix). file_path: PathBuf, @@ -349,11 +348,7 @@ fn propagate_children(parent_file: &Path, ctx: &mut Context) { .cloned() .unwrap_or_else(|| "crate".to_string()); - let reexported = ctx - .reexports - .get(parent_file) - .cloned() - .unwrap_or_default(); + let reexported = ctx.reexports.get(parent_file).cloned().unwrap_or_default(); let Some(children) = ctx.children.get(parent_file).cloned() else { return; @@ -367,8 +362,7 @@ fn propagate_children(parent_file: &Path, ctx: &mut Context) { format!("{}::{}", parent_effective, child.name) }; - ctx.effective_paths - .insert(child.file.clone(), effective); + ctx.effective_paths.insert(child.file.clone(), effective); propagate_children(&child.file, ctx); } } |
