Skip to content

Commit 54c7818

Browse files
phip1611nicholasbishop
authored andcommitted
remove const fn where it breaks the build with our curent MSRV
1 parent dab2c5b commit 54c7818

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: src/table/boot.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,8 @@ impl<'a> Drop for ProtocolsPerHandle<'a> {
19251925
impl<'a> ProtocolsPerHandle<'a> {
19261926
/// Get the protocol interface [`Guids`][Guid] that are installed on the
19271927
/// [`Handle`].
1928-
pub const fn protocols<'b>(&'b self) -> &'b [&'a Guid] {
1928+
#[allow(clippy::missing_const_for_fn)] // Required until we bump the MSRV.
1929+
pub fn protocols<'b>(&'b self) -> &'b [&'a Guid] {
19291930
// convert raw pointer to slice here so that we can get
19301931
// appropriate lifetime of the slice.
19311932
unsafe { slice::from_raw_parts(self.protocols, self.count) }
@@ -1951,7 +1952,8 @@ impl<'a> Drop for HandleBuffer<'a> {
19511952

19521953
impl<'a> HandleBuffer<'a> {
19531954
/// Get an array of [`Handles`][Handle] that support the requested protocol.
1954-
pub const fn handles(&self) -> &[Handle] {
1955+
#[allow(clippy::missing_const_for_fn)] // Required until we bump the MSRV.
1956+
pub fn handles(&self) -> &[Handle] {
19551957
// convert raw pointer to slice here so that we can get
19561958
// appropriate lifetime of the slice.
19571959
unsafe { slice::from_raw_parts(self.buffer, self.count) }

Diff for: src/table/system.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ impl<View: SystemTableView> SystemTable<View> {
7070

7171
/// Returns the config table entries, a linear array of structures
7272
/// pointing to other system-specific tables.
73-
pub const fn config_table(&self) -> &[cfg::ConfigTableEntry] {
73+
#[allow(clippy::missing_const_for_fn)] // Required until we bump the MSRV.
74+
pub fn config_table(&self) -> &[cfg::ConfigTableEntry] {
7475
unsafe { slice::from_raw_parts(self.table.cfg_table, self.table.nr_cfg) }
7576
}
7677

0 commit comments

Comments
 (0)