mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2025-12-31 11:29:37 +00:00
virtio_gpu.rs: Allow mutation in AssociatedScanouts methods
Corrected the AssociatedScanouts methods to remove the const keyword and allow them to be mutable functions Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This commit is contained in:
parent
1a1d1e2685
commit
852751b76a
@ -262,12 +262,14 @@ pub struct FenceState {
|
||||
struct AssociatedScanouts(u32);
|
||||
|
||||
impl AssociatedScanouts {
|
||||
const fn enable(&mut self, scanout_id: u32) {
|
||||
#[allow(clippy::missing_const_for_fn)]
|
||||
fn enable(&mut self, scanout_id: u32) {
|
||||
self.0 |= 1 << scanout_id;
|
||||
}
|
||||
|
||||
const fn disable(&mut self, scanout_id: u32) {
|
||||
self.0 ^= 1 << scanout_id;
|
||||
#[allow(clippy::missing_const_for_fn)]
|
||||
fn disable(&mut self, scanout_id: u32) {
|
||||
self.0 &= !(1 << scanout_id);
|
||||
}
|
||||
|
||||
const fn has_any_enabled(self) -> bool {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user