all: address clippy lints
This commit is contained in:
parent
498e01a8bb
commit
84d7632341
43 changed files with 170 additions and 149 deletions
|
|
@ -222,7 +222,7 @@ impl PwCon {
|
|||
pub fn get_registry(self: &Rc<Self>) -> Rc<PwRegistry> {
|
||||
let registry = Rc::new(PwRegistry {
|
||||
data: self.proxy_data(),
|
||||
con: self.clone(),
|
||||
_con: self.clone(),
|
||||
});
|
||||
if !self.dead.get() {
|
||||
self.objects.set(registry.data.id, registry.clone());
|
||||
|
|
@ -340,7 +340,7 @@ impl PwConHolder {
|
|||
});
|
||||
let client = Rc::new(PwClient {
|
||||
data: data.proxy_data(),
|
||||
con: data.clone(),
|
||||
_con: data.clone(),
|
||||
});
|
||||
data.objects.set(0, core.clone());
|
||||
data.objects.set(1, client.clone());
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ pw_opcodes! {
|
|||
|
||||
pub struct PwClient {
|
||||
pub data: PwObjectData,
|
||||
pub con: Rc<PwCon>,
|
||||
pub _con: Rc<PwCon>,
|
||||
}
|
||||
|
||||
impl PwClient {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ pub struct PwClientNodePort {
|
|||
pub direction: SpaDirection,
|
||||
pub id: u32,
|
||||
|
||||
pub destroyed: Cell<bool>,
|
||||
pub _destroyed: Cell<bool>,
|
||||
|
||||
pub effective_format: Cell<PwClientNodePortFormat>,
|
||||
pub supported_formats: RefCell<Option<PwClientNodePortSupportedFormats>>,
|
||||
|
|
@ -129,18 +129,18 @@ pub struct PwClientNodePort {
|
|||
pub struct PwClientNodeBufferConfig {
|
||||
pub num_buffers: usize,
|
||||
pub planes: usize,
|
||||
pub size: Option<u32>,
|
||||
pub stride: Option<u32>,
|
||||
pub align: usize,
|
||||
pub _size: Option<u32>,
|
||||
pub _stride: Option<u32>,
|
||||
pub _align: usize,
|
||||
pub data_type: SpaDataType,
|
||||
}
|
||||
|
||||
pub struct PwClientNodeBuffer {
|
||||
pub meta_header: Option<Rc<PwMemTyped<spa_meta_header>>>,
|
||||
pub meta_busy: Option<Rc<PwMemTyped<spa_meta_busy>>>,
|
||||
pub _meta_header: Option<Rc<PwMemTyped<spa_meta_header>>>,
|
||||
pub _meta_busy: Option<Rc<PwMemTyped<spa_meta_busy>>>,
|
||||
pub meta_video_crop: Option<Rc<PwMemTyped<spa_meta_region>>>,
|
||||
pub chunks: Vec<Rc<PwMemTyped<spa_chunk>>>,
|
||||
pub slices: Vec<Rc<PwMemSlice>>,
|
||||
pub _slices: Vec<Rc<PwMemSlice>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
|
|
@ -181,8 +181,8 @@ pub struct PwClientNode {
|
|||
}
|
||||
|
||||
pub struct PwNodeActivation {
|
||||
pub activation: Rc<PwMemTyped<pw_node_activation>>,
|
||||
pub fd: Rc<OwnedFd>,
|
||||
pub _activation: Rc<PwMemTyped<pw_node_activation>>,
|
||||
pub _fd: Rc<OwnedFd>,
|
||||
}
|
||||
|
||||
// pub struct PwNodeBuffer {
|
||||
|
|
@ -250,7 +250,7 @@ impl PwClientNode {
|
|||
node: self.clone(),
|
||||
direction,
|
||||
id: ids.borrow_mut().acquire(),
|
||||
destroyed: Cell::new(false),
|
||||
_destroyed: Cell::new(false),
|
||||
effective_format: Cell::new(Default::default()),
|
||||
supported_formats: RefCell::new(None),
|
||||
supported_metas: Cell::new(PwClientNodePortSupportedMetas::none()),
|
||||
|
|
@ -676,11 +676,11 @@ impl PwClientNode {
|
|||
}
|
||||
|
||||
res.push(Rc::new(PwClientNodeBuffer {
|
||||
meta_header,
|
||||
meta_busy,
|
||||
_meta_header: meta_header,
|
||||
_meta_busy: meta_busy,
|
||||
meta_video_crop,
|
||||
chunks,
|
||||
slices,
|
||||
_slices: slices,
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
@ -765,8 +765,8 @@ impl PwClientNode {
|
|||
self.activations.set(
|
||||
node,
|
||||
Rc::new(PwNodeActivation {
|
||||
activation: typed,
|
||||
fd: signalfd,
|
||||
_activation: typed,
|
||||
_fd: signalfd,
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ impl PwCore {
|
|||
self.con.mem.mems.set(
|
||||
id,
|
||||
Rc::new(PwMem {
|
||||
ty,
|
||||
_ty: ty,
|
||||
read,
|
||||
write,
|
||||
fd,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ pw_opcodes! {
|
|||
|
||||
pub struct PwRegistry {
|
||||
pub data: PwObjectData,
|
||||
pub con: Rc<PwCon>,
|
||||
pub _con: Rc<PwCon>,
|
||||
}
|
||||
|
||||
impl PwRegistry {
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@ pub enum PwMemType {
|
|||
}
|
||||
|
||||
pub struct PwMem {
|
||||
pub ty: PwMemType,
|
||||
pub _ty: PwMemType,
|
||||
pub read: bool,
|
||||
pub write: bool,
|
||||
pub fd: Rc<OwnedFd>,
|
||||
}
|
||||
|
||||
pub struct PwMemMap {
|
||||
pub mem: Rc<PwMem>,
|
||||
pub _mem: Rc<PwMem>,
|
||||
pub range: Range<usize>,
|
||||
pub map: Mmapped,
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ impl PwMem {
|
|||
Err(e) => return Err(PwMemError::MmapFailed(e)),
|
||||
};
|
||||
Ok(Rc::new(PwMemMap {
|
||||
mem: self.clone(),
|
||||
_mem: self.clone(),
|
||||
range,
|
||||
map,
|
||||
}))
|
||||
|
|
|
|||
|
|
@ -261,8 +261,8 @@ impl<'a> PwParser<'a> {
|
|||
controls: PwParser::new(&self.data[self.pos + 8..self.pos + len], self.fds),
|
||||
}),
|
||||
PW_TYPE_Pointer => PwPod::Pointer(PwPodPointer {
|
||||
ty: PwPointerType(self.read_raw(0)?),
|
||||
value: self.read_raw(8)?,
|
||||
_ty: PwPointerType(self.read_raw(0)?),
|
||||
_value: self.read_raw(8)?,
|
||||
}),
|
||||
PW_TYPE_Fd => PwPod::Fd(self.read_raw(0)?),
|
||||
PW_TYPE_Choice => PwPod::Choice(PwPodChoice {
|
||||
|
|
@ -298,9 +298,9 @@ impl<'a> PwParser<'a> {
|
|||
let ty = PwControlType(self.read_raw(4)?);
|
||||
self.pos += 8;
|
||||
Ok(PwPodControl {
|
||||
offset,
|
||||
ty,
|
||||
value: self.read_pod()?,
|
||||
_offset: offset,
|
||||
_ty: ty,
|
||||
_value: self.read_pod()?,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1124,15 +1124,15 @@ pub struct PwPodSequence<'a> {
|
|||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct PwPodControl<'a> {
|
||||
pub offset: u32,
|
||||
pub ty: PwControlType,
|
||||
pub value: PwPod<'a>,
|
||||
pub _offset: u32,
|
||||
pub _ty: PwControlType,
|
||||
pub _value: PwPod<'a>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct PwPodPointer {
|
||||
pub ty: PwPointerType,
|
||||
pub value: usize,
|
||||
pub _ty: PwPointerType,
|
||||
pub _value: usize,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue