From ca263b33a1e1c42ee2f22be6cc1da5014dda1096 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Mon, 20 Dec 2021 21:28:12 +0200 Subject: [PATCH] fix: Add missing #[must_use] attributes Clippy was very unhappy. --- nucleus/src/arch/aarch64/memory/addr/phys_addr.rs | 2 ++ nucleus/src/arch/aarch64/memory/addr/virt_addr.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nucleus/src/arch/aarch64/memory/addr/phys_addr.rs b/nucleus/src/arch/aarch64/memory/addr/phys_addr.rs index 4e29e58..0be7fd9 100644 --- a/nucleus/src/arch/aarch64/memory/addr/phys_addr.rs +++ b/nucleus/src/arch/aarch64/memory/addr/phys_addr.rs @@ -73,6 +73,7 @@ impl PhysAddr { /// Aligns the physical address upwards to the given alignment. /// /// See the `align_up` function for more information. + #[must_use] pub fn aligned_up(self, align: U) -> Self where U: Into, @@ -83,6 +84,7 @@ impl PhysAddr { /// Aligns the physical address downwards to the given alignment. /// /// See the `align_down` function for more information. + #[must_use] pub fn aligned_down(self, align: U) -> Self where U: Into, diff --git a/nucleus/src/arch/aarch64/memory/addr/virt_addr.rs b/nucleus/src/arch/aarch64/memory/addr/virt_addr.rs index 4357f68..7ea4066 100644 --- a/nucleus/src/arch/aarch64/memory/addr/virt_addr.rs +++ b/nucleus/src/arch/aarch64/memory/addr/virt_addr.rs @@ -108,6 +108,7 @@ impl VirtAddr { /// Aligns the virtual address upwards to the given alignment. /// /// See the `align_up` free function for more information. + #[must_use] pub fn aligned_up(self, align: U) -> Self where U: Into, @@ -118,6 +119,7 @@ impl VirtAddr { /// Aligns the virtual address downwards to the given alignment. /// /// See the `align_down` free function for more information. + #[must_use] pub fn aligned_down(self, align: U) -> Self where U: Into,