Skip to content

Commit 036968b

Browse files
committed
clippy
1 parent 1b50454 commit 036968b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

apps/desktop/src-tauri/src/editor_window.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async fn do_prewarm(app: AppHandle, path: PathBuf) -> PendingResult {
3737
GpuOutputFormat::Rgba => WSFrameFormat::Rgba,
3838
};
3939
WSFrame {
40-
data: frame.data,
40+
data: Arc::new(frame.data.into_vec()),
4141
width: frame.width,
4242
height: frame.height,
4343
stride: frame.y_stride,
@@ -254,7 +254,7 @@ impl EditorInstances {
254254
GpuOutputFormat::Rgba => WSFrameFormat::Rgba,
255255
};
256256
WSFrame {
257-
data: frame.data,
257+
data: Arc::new(frame.data.into_vec()),
258258
width: frame.width,
259259
height: frame.height,
260260
stride: frame.y_stride,

crates/rendering/src/cursor_interpolation.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,8 @@ mod tests {
625625
.map(|i| cursor_move(i as f64 * 2.0, 0.5 + i as f64 * 1e-6, 0.5))
626626
.collect();
627627
let decimated = decimate_cursor_moves(&moves);
628-
match decimated {
629-
Cow::Owned(v) => assert!(v.len() < moves.len()),
630-
Cow::Borrowed(_) => {}
628+
if let Cow::Owned(v) = decimated {
629+
assert!(v.len() < moves.len());
631630
}
632631
}
633632

0 commit comments

Comments
 (0)