Skip to content

Commit 3ffd554

Browse files
committed
make this function const
1 parent be2762f commit 3ffd554

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cortex-ar/src/mmu.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ impl L1Section {
284284

285285
/// Set the section attributes without changing the address.
286286
#[inline]
287-
pub fn set_section_attrs(&mut self, section_attrs: SectionAttributes) {
288-
self.raw_value = self.base_addr().as_u32() | section_attrs.l1_section_part().raw_value();
287+
pub const fn set_section_attrs(&mut self, section_attrs: SectionAttributes) {
288+
self.raw_value = self.base_addr().value() as u32 | section_attrs.l1_section_part().raw_value();
289289
}
290290
}

0 commit comments

Comments
 (0)