Skip to content

Commit 61ec1fc

Browse files
committed
More clippy
1 parent a4496ac commit 61ec1fc

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

sparse_strips/vello_cpu/src/dispatch/multi_threaded.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,10 @@ impl MultiThreadedDispatcher {
258258
let clip_path = self
259259
.clip_context
260260
.get()
261-
.map(|c| (c.strips.into(), c.alphas.into()));
261+
.map(|c| OwnedClip {
262+
strips: c.strips.into(),
263+
alphas: c.alphas.into(),
264+
});
262265
let task = RenderTask {
263266
idx: task_idx,
264267
clip_path,
@@ -631,10 +634,16 @@ impl Debug for MultiThreadedDispatcher {
631634
}
632635
}
633636

637+
#[derive(Debug)]
638+
struct OwnedClip {
639+
strips: Box<[Strip]>,
640+
alphas: Box<[u8]>
641+
}
642+
634643
#[derive(Debug)]
635644
pub(crate) struct RenderTask {
636645
pub(crate) idx: u32,
637-
pub(crate) clip_path: Option<(Box<[Strip]>, Box<[u8]>)>,
646+
pub(crate) clip_path: Option<OwnedClip>,
638647
pub(crate) path: Box<[PathEl]>,
639648
pub(crate) tasks: Box<[RenderTaskType]>,
640649
}

sparse_strips/vello_cpu/src/dispatch/multi_threaded/worker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ impl Worker {
5151
let mut task_buf = Vec::with_capacity(render_task.tasks.len());
5252
let task_idx = render_task.idx;
5353
let path_clip = render_task.clip_path.as_ref().map(|c| PathDataRef {
54-
strips: c.0.as_ref(),
55-
alphas: c.1.as_ref(),
54+
strips: c.strips.as_ref(),
55+
alphas: c.alphas.as_ref(),
5656
});
5757

5858
for task in render_task.tasks {

0 commit comments

Comments
 (0)