We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cbf209 commit 62d0729Copy full SHA for 62d0729
uefi/src/proto/loaded_image.rs
@@ -95,7 +95,7 @@ impl LoadedImage {
95
///
96
/// [`load_options_as_cstr16`]: `Self::load_options_as_cstr16`
97
#[must_use]
98
- pub fn load_options_as_bytes(&self) -> Option<&[u8]> {
+ pub const fn load_options_as_bytes(&self) -> Option<&[u8]> {
99
if self.0.load_options.is_null() {
100
None
101
} else {
uefi/src/proto/security/memory_protection.rs
@@ -92,7 +92,7 @@ impl MemoryProtection {
92
}
93
94
/// Convert a byte `Range` to `(base_address, length)`.
-fn range_to_base_and_len(r: Range<PhysicalAddress>) -> (PhysicalAddress, PhysicalAddress) {
+const fn range_to_base_and_len(r: Range<PhysicalAddress>) -> (PhysicalAddress, PhysicalAddress) {
(r.start, r.end.checked_sub(r.start).unwrap())
0 commit comments