Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

test(rendering): initialize camera fixtures without reassignment

Richie McIlroy01f2bd6b90d9
diff --git a/crates/rendering/src/lib.rs b/crates/rendering/src/lib.rs
index 3ee3482c2..83f2f143a 100644
--- a/crates/rendering/src/lib.rs
+++ b/crates/rendering/src/lib.rs
@@ -5171,10 +5171,12 @@ mod tests {
CameraXPosition::Right,
] {
for y in [CameraYPosition::Top, CameraYPosition::Bottom] {
- let mut camera = Camera::default();
- camera.position = cap_project::CameraPosition {
- x: x.clone(),
- y: y.clone(),
+ let mut camera = Camera {
+ position: cap_project::CameraPosition {
+ x: x.clone(),
+ y: y.clone(),
+ },
+ ..Default::default()
};
camera.background_blur.mode = cap_project::BackgroundBlurMode::Remove;
let padding = if cfg!(target_os = "macos") { 0.0 } else { 50.0 };