Skip to content

Commit b21bc3c

Browse files
Merge #335
335: Also always inline set_bit/clear bit r=Disasm a=therealprof Reduces build size by quite a bit in dev builds but to my surprise also helps in optimised builds using set_bit/clear_bit indirectly via HAL impls. Closes #334 Signed-off-by: Daniel Egger <[email protected]> Co-authored-by: Daniel Egger <[email protected]>
2 parents fde8568 + 1202ec4 commit b21bc3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/generate/register.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,11 +661,13 @@ pub fn fields(
661661
if width == 1 {
662662
proxy_items.push(quote! {
663663
///Sets the field bit
664+
#[inline(always)]
664665
pub #unsafety fn set_bit(self) -> &'a mut W {
665666
self.bit(true)
666667
}
667668

668669
///Clears the field bit
670+
#[inline(always)]
669671
pub #unsafety fn clear_bit(self) -> &'a mut W {
670672
self.bit(false)
671673
}

0 commit comments

Comments
 (0)