Skip to content

Commit d4aa66d

Browse files
jiangliuandreeaflorescu
authored andcommitted
queue: do not impl Clone for QueueState
We should not implement Clone for QueueState, otherwise there may be multiple actors operating on the same underlying queue. Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
1 parent 2f01935 commit d4aa66d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/virtio-queue/src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::defs::{
2222
use crate::{error, AvailIter, Descriptor, Error, QueueStateGuard, QueueStateT, VirtqUsedElem};
2323

2424
/// Struct to maintain information and manipulate state of a virtio queue.
25-
#[derive(Clone, Debug)]
25+
#[derive(Debug)]
2626
pub struct QueueState {
2727
/// The maximum size in elements offered by the device.
2828
pub max_size: u16,

0 commit comments

Comments
 (0)