Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions src/patch/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,7 @@ impl RegisterExt for Register {

fn set_field_read_action(&mut self, fspec: &str, action: ReadAction) {
for ftag in self.iter_fields(fspec) {
ftag.read_action = if action == ReadAction::Modify {
None
} else {
Some(action)
};
ftag.read_action = Some(action);
}
}

Expand Down
3 changes: 0 additions & 3 deletions svdtools/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,9 +1387,6 @@ def set_field_read_action(self, fspec, action):
tag = ftag.find("readAction")
if tag is None:
tag = ET.SubElement(ftag, "readAction")
elif action == "modify":
ftag.remove(tag)
return
tag.text = action

def set_field_modified_write_values(self, fspec, mwv):
Expand Down