Skip to content

Conversation

@mkrasnitski
Copy link
Contributor

@mkrasnitski mkrasnitski commented Jan 12, 2025

Ran cargo clippy with default lints. A few small cleanups included as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the before to be more readable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it would be best if the definition of BNInstructionInfo was the following instead:

pub struct BNInstructionInfo {
    pub length: usize,
    pub branchCount: usize,
    pub archTransitionByTargetAddr: bool,
    pub delaySlots: u8,
    pub branchInfo: [BNBranchInfo; 3usize],
}

pub struct BNBranchInfo {
    pub branchType: BNBranchType,
    pub branchTarget: u64,
    #[doc = " If null, same architecture as instruction"]
    pub branchArch: *mut BNArchitecture,
}

Then we could iterate over all the branch info at once instead of by-index. This would require changing the C++ definition though.

@emesare
Copy link
Member

emesare commented Jan 13, 2025

Merged with 3ea9c4e thank you! I also went ahead and added clippy to the CI, it should only warn however. Mostly just good for visibility in PR's!

@emesare emesare closed this Jan 13, 2025
@mkrasnitski mkrasnitski deleted the clippy branch January 20, 2025 01:00
@emesare emesare self-assigned this Feb 3, 2025
@emesare emesare added this to the Gallifrey milestone Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants