Skip to content

Conversation

@sapir
Copy link

@sapir sapir commented May 9, 2019

No description provided.

Copy link
Contributor

@mitchmindtree mitchmindtree left a comment

Choose a reason for hiding this comment

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

Looks good to me, mostly appears to be a cargo fmt run and some clippy improvements, but also refactors PrimarySource from an enum to a struct with associated consts rather than variants.

pub const OPPS: PrimarySource = PrimarySource(code_to_u32!(b"OPPS"));
pub const FREE: PrimarySource = PrimarySource(code_to_u32!(b"FREE"));
pub const INIT: PrimarySource = PrimarySource(code_to_u32!(b"INIT"));
pub const NULL: PrimarySource = PrimarySource(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just thought I'd mention you can also use pub const NULL: Self = Self(0);, etc which can make future refactoring a little easier, but doesn't really matter.

Coding-Badly pushed a commit to gremlin/ntp that referenced this pull request Mar 10, 2022
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.

3 participants