Skip to content

Commit 22604c7

Browse files
uefi: Consistently use &mut self for pxe::BaseCode methods
Although these methods are just reading data, they are almost certainly modifying internal state in the UEFI protocol and so should be `&mut`.
1 parent ed5a777 commit 22604c7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

uefi/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
- **Breaking:** Removed `BootPolicyError` as `BootPolicy` construction is no
1010
longer fallible. `BootPolicy` now tightly integrates the new `Boolean` type
1111
of `uefi-raw`.
12+
- **Breaking:** The `pxe::BaseCode::tftp_read_dir` and
13+
`pxe::BaseCode::mtftp_read_dir` methods now take `&mut self` instead of
14+
`&self`.
1215
- `boot::memory_map()` will never return `Status::BUFFER_TOO_SMALL` from now on,
1316
as this is considered a hard internal error where users can't do anything
1417
about it anyway. It will panic instead.

uefi/src/proto/network/pxe.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ impl BaseCode {
233233

234234
/// Reads a directory listing of a directory on a TFTP server.
235235
pub fn tftp_read_dir<'a>(
236-
&self,
236+
&mut self,
237237
server_ip: &IpAddress,
238238
directory_name: &CStr8,
239239
buffer: &'a mut [u8],
@@ -366,7 +366,7 @@ impl BaseCode {
366366

367367
/// Reads a directory listing of a directory on a MTFTP server.
368368
pub fn mtftp_read_dir<'a>(
369-
&self,
369+
&mut self,
370370
server_ip: &IpAddress,
371371
buffer: &'a mut [u8],
372372
info: &MtftpInfo,

0 commit comments

Comments
 (0)