Skip to content

Commit

Permalink
normalize paths
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Jan 31, 2025
1 parent c94dc77 commit c9221bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

- Fix reexport path when "%s" inside "dirivedFrom"
- Force using rust edition 2021 in CI
- Added lifetime ellision for `FieldWriter` where the explicit lifetimes are not necessary, which
fixes the `clippy::needless_lifetimes` warning on rustc 1.84
Expand Down
12 changes: 8 additions & 4 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,18 @@ pub fn block_path_to_ty(
) -> TypePath {
let mut path = config.settings.crate_path.clone().unwrap_or_default().0;
path.segments.push(path_segment(ident(
&bpath.peripheral,
&bpath.peripheral.remove_dim(),
config,
"peripheral_mod",
span,
)));
for ps in &bpath.path {
path.segments
.push(path_segment(ident(ps, config, "cluster_mod", span)));
path.segments.push(path_segment(ident(
&ps.remove_dim(),
config,
"cluster_mod",
span,
)));
}
TypePath { qself: None, path }
}
Expand All @@ -314,7 +318,7 @@ pub fn register_path_to_ty(
) -> TypePath {
let mut p = block_path_to_ty(&rpath.block, config, span);
p.path.segments.push(path_segment(ident(
&rpath.name,
&rpath.name.remove_dim(),
config,
"register_mod",
span,
Expand Down

0 comments on commit c9221bc

Please sign in to comment.