Skip to content

clone ty_name -> ty_str #929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/generate/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ fn expand_register(
} else {
info_name.remove_dim()
};
let ty_str = ty_name.clone();
let mut ty_str = ty_name.clone();

match register {
Register::Single(info) => {
Expand Down Expand Up @@ -1154,12 +1154,9 @@ fn expand_register(
"".into()
};
let ac = match derive_info {
DeriveInfo::Implicit(_) => {
ty_name = info_name.expand_dim(&index);
convert_list && sequential_indexes_from0
}
DeriveInfo::Explicit(_) => {
DeriveInfo::Implicit(_) | DeriveInfo::Explicit(_) => {
ty_name = info_name.expand_dim(&index);
ty_str = ty_name.clone();
convert_list && sequential_indexes_from0
}
_ => convert_list,
Expand Down Expand Up @@ -1207,7 +1204,7 @@ fn expand_register(
let idx_name = ident(
&util::fullname(&ri.name, &info.alternate_group, config.ignore_groups),
config,
"cluster_accessor",
"register_accessor",
span,
);
let doc = make_comment(
Expand Down
Loading