Skip to content

Commit 595d6b3

Browse files
committed
memory_encryption: fix formatting
1 parent 023cd44 commit 595d6b3

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/addr.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,10 @@ impl PhysAddr {
445445
/// If the `memory_encryption` feature is available and has been enabled, this function also
446446
/// panics fails if the encryption bit is manually set in the address.
447447
#[inline]
448-
#[cfg_attr(all(not(feature = "memory_encryption"), feature = "const_fn"), const_fn::const_fn)]
448+
#[cfg_attr(
449+
all(not(feature = "memory_encryption"), feature = "const_fn"),
450+
const_fn::const_fn
451+
)]
449452
pub fn new(addr: u64) -> Self {
450453
// TODO: Replace with .ok().expect(msg) when that works on stable.
451454
match Self::try_new(addr) {
@@ -470,7 +473,10 @@ impl PhysAddr {
470473
/// If the `memory_encryption` feature is available and has been enabled, this also fails if the
471474
/// encryption bit is manually set in the address.
472475
#[inline]
473-
#[cfg_attr(all(not(feature = "memory_encryption"), feature = "const_fn"), const_fn::const_fn)]
476+
#[cfg_attr(
477+
all(not(feature = "memory_encryption"), feature = "const_fn"),
478+
const_fn::const_fn
479+
)]
474480
pub fn try_new(addr: u64) -> Result<Self, PhysAddrNotValid> {
475481
let p = Self::new_truncate(addr);
476482
if p.0 == addr {

src/structures/paging/page_table.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ impl PageTableEntry {
5252

5353
/// Returns the flags of this entry.
5454
#[inline]
55-
#[cfg_attr(all(not(feature = "memory_encryption"), feature = "const_fn"), const_fn::const_fn)]
55+
#[cfg_attr(
56+
all(not(feature = "memory_encryption"), feature = "const_fn"),
57+
const_fn::const_fn
58+
)]
5659
pub fn flags(&self) -> PageTableFlags {
5760
PageTableFlags::from_bits_retain(self.entry & !Self::physical_address_mask())
5861
}

0 commit comments

Comments
 (0)