Skip to content

Commit eb6d20f

Browse files
committed
refactor(core): ignore the wrong_self_convention lint for CfgStartupHook::to_attr
Changing the receiver to `self` as per the suggestion complicates the passing of this method to `ComptimeVec::map`, which expects `~const FnMut(&CfgStartupHook)`. Converting `~const FnMut(CfgStartup- Hook)` to `~const FnMut(&CfgStartupHook)` on-site is not trivial because closures aren't callable in constant contexts yet.
1 parent 334d72d commit eb6d20f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/r3_core/src/kernel/hook.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ impl Init for StartupHookAttr {
154154
}
155155

156156
impl CfgStartupHook {
157+
#[allow(clippy::wrong_self_convention)]
157158
pub const fn to_attr(&self) -> StartupHookAttr {
158159
StartupHookAttr { start: self.start }
159160
}

0 commit comments

Comments
 (0)