Skip to content

Commit 3bb0229

Browse files
GabrielMajerinicholasbishop
authored andcommitted
Add missing #[must_use] marker attributes
1 parent 97ad84a commit 3bb0229

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/data_types/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ impl Event {
2222
/// When an event is closed by calling `BootServices::close_event`, that event and ALL references
2323
/// to it are invalidated and the underlying memory is freed by firmware. The caller must ensure
2424
/// that any clones of a closed `Event` are never used again.
25+
#[must_use]
2526
pub unsafe fn unsafe_clone(&self) -> Self {
2627
Self(self.0)
2728
}

src/table/system.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ impl SystemTable<Boot> {
191191
/// used after boot services are exited. However, the singleton-based
192192
/// designs that Rust uses for memory allocation, logging, and panic
193193
/// handling require taking this risk.
194+
#[must_use]
194195
pub unsafe fn unsafe_clone(&self) -> Self {
195196
SystemTable {
196197
table: self.table,

0 commit comments

Comments
 (0)