1
0
Fork 0
forked from wry/wry

all: address clippy lints

This commit is contained in:
Julian Orth 2024-07-02 17:11:34 +02:00
parent 498e01a8bb
commit 84d7632341
43 changed files with 170 additions and 149 deletions

View file

@ -181,7 +181,10 @@ impl UsrJayRenderCtxOwner for PortalDisplay {
return;
}
};
let ctx = Rc::new(PortalRenderCtx { dev_id, ctx });
let ctx = Rc::new(PortalRenderCtx {
_dev_id: dev_id,
ctx,
});
self.render_ctx.set(Some(ctx.clone()));
self.state.render_ctxs.set(dev_id, Rc::downgrade(&ctx));
}

View file

@ -1,6 +1,6 @@
use {crate::gfx_api::GfxContext, std::rc::Rc, uapi::c};
pub struct PortalRenderCtx {
pub dev_id: c::dev_t,
pub _dev_id: c::dev_t,
pub ctx: Rc<dyn GfxContext>,
}

View file

@ -101,7 +101,7 @@ pub struct SelectingWorkspaceScreencast {
pub struct StartingScreencast {
pub session: Rc<ScreencastSession>,
pub request_obj: Rc<DbusObject>,
pub _request_obj: Rc<DbusObject>,
pub reply: Rc<PendingReply<StartReply<'static>>>,
pub node: Rc<PwClientNode>,
pub dpy: Rc<PortalDisplay>,
@ -241,7 +241,7 @@ impl SelectingScreencastCore {
]);
let starting = Rc::new(StartingScreencast {
session: self.session.clone(),
request_obj: self.request_obj.clone(),
_request_obj: self.request_obj.clone(),
reply: self.reply.clone(),
node,
dpy: dpy.clone(),
@ -391,9 +391,9 @@ impl UsrJayScreencastOwner for StartedScreencast {
let bc = PwClientNodeBufferConfig {
num_buffers: buffers.len(),
planes: buffer.planes.len(),
stride: Some(buffer.planes[0].stride),
size: Some(buffer.planes[0].stride * buffer.height as u32),
align: 16,
_stride: Some(buffer.planes[0].stride),
_size: Some(buffer.planes[0].stride * buffer.height as u32),
_align: 16,
data_type: SPA_DATA_DmaBuf,
};
self.port.buffer_config.set(Some(bc));

View file

@ -846,7 +846,7 @@ pub struct GuiBuffer {
pub fb: Rc<dyn GfxFramebuffer>,
pub _bo: Option<GbmBo>,
pub free: Cell<bool>,
pub size: (i32, i32),
pub _size: (i32, i32),
}
struct GuiBufferPending {
@ -897,7 +897,7 @@ impl UsrLinuxBufferParamsOwner for GuiBufferPending {
fb: self.fb.clone(),
_bo: self.bo.take(),
free: Cell::new(true),
size: self.size,
_size: self.size,
});
buf.wl.owner.set(Some(buf.clone()));
self.window.bufs.borrow_mut().push(buf);