Skip to content

Commit 5c449f1

Browse files
committed
uefi: change Fn closure to FnMut
1 parent 6a77e28 commit 5c449f1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

uefi/src/system.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ pub fn uefi_revision() -> Revision {
5151

5252
/// Call `f` with a slice of [`ConfigTableEntry`]. Each entry provides access to
5353
/// a vendor-specific table.
54-
pub fn with_config_table<F, R>(f: F) -> R
54+
pub fn with_config_table<F, R>(mut f: F) -> R
5555
where
56-
F: Fn(&[ConfigTableEntry]) -> R,
56+
F: FnMut(&[ConfigTableEntry]) -> R,
5757
{
5858
let st = table::system_table_raw_panicking();
5959
// SAFETY: valid per requirements of `set_system_table`.
@@ -75,9 +75,9 @@ where
7575
///
7676
/// This function will panic if called after exiting boot services, or if stdin
7777
/// is not available.
78-
pub fn with_stdin<F, R>(f: F) -> R
78+
pub fn with_stdin<F, R>(mut f: F) -> R
7979
where
80-
F: Fn(&mut Input) -> R,
80+
F: FnMut(&mut Input) -> R,
8181
{
8282
let st = table::system_table_raw_panicking();
8383
// SAFETY: valid per requirements of `set_system_table`.
@@ -101,9 +101,9 @@ where
101101
///
102102
/// This function will panic if called after exiting boot services, or if stdout
103103
/// is not available.
104-
pub fn with_stdout<F, R>(f: F) -> R
104+
pub fn with_stdout<F, R>(mut f: F) -> R
105105
where
106-
F: Fn(&mut Output) -> R,
106+
F: FnMut(&mut Output) -> R,
107107
{
108108
let st = table::system_table_raw_panicking();
109109
// SAFETY: valid per requirements of `set_system_table`.
@@ -127,9 +127,9 @@ where
127127
///
128128
/// This function will panic if called after exiting boot services, or if stderr
129129
/// is not available.
130-
pub fn with_stderr<F, R>(f: F) -> R
130+
pub fn with_stderr<F, R>(mut f: F) -> R
131131
where
132-
F: Fn(&mut Output) -> R,
132+
F: FnMut(&mut Output) -> R,
133133
{
134134
let st = table::system_table_raw_panicking();
135135
// SAFETY: valid per requirements of `set_system_table`.

0 commit comments

Comments
 (0)