Skip to content

Commit bc53faa

Browse files
mkroeningIsaacWoods
authored andcommitted
feat: make update_command take &mut self
Signed-off-by: Martin Kröning <[email protected]>
1 parent c932aa5 commit bc53faa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl PciHeader {
198198
CommandRegister::from_bits_retain(data as u16)
199199
}
200200

201-
pub fn update_command<F>(&self, access: impl ConfigRegionAccess, f: F)
201+
pub fn update_command<F>(&mut self, access: impl ConfigRegionAccess, f: F)
202202
where
203203
F: FnOnce(CommandRegister) -> CommandRegister,
204204
{
@@ -279,7 +279,7 @@ impl EndpointHeader {
279279
self.header().command(access)
280280
}
281281

282-
pub fn update_command<F>(&self, access: impl ConfigRegionAccess, f: F)
282+
pub fn update_command<F>(&mut self, access: impl ConfigRegionAccess, f: F)
283283
where
284284
F: FnOnce(CommandRegister) -> CommandRegister,
285285
{
@@ -517,7 +517,7 @@ impl PciPciBridgeHeader {
517517
self.header().command(access)
518518
}
519519

520-
pub fn update_command<F>(&self, access: impl ConfigRegionAccess, f: F)
520+
pub fn update_command<F>(&mut self, access: impl ConfigRegionAccess, f: F)
521521
where
522522
F: FnOnce(CommandRegister) -> CommandRegister,
523523
{

0 commit comments

Comments
 (0)