Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

test(recording): initialize placement fixtures without reassignment

Richie McIlroy39cee330bf85
diff --git a/crates/recording/src/camera_placement.rs b/crates/recording/src/camera_placement.rs
index c83145c8d..64dc3e3ae 100644
--- a/crates/recording/src/camera_placement.rs
+++ b/crates/recording/src/camera_placement.rs
@@ -137,8 +137,10 @@ mod tests {
use cap_project::BackgroundBlurMode;
fn position(bounds: [f64; 4], reference: [f64; 4], cutout: bool) -> serde_json::Value {
- let mut camera = Camera::default();
- camera.manual_position = Some(cap_project::XY::new(0.8, 0.2));
+ let mut camera = Camera {
+ manual_position: Some(cap_project::XY::new(0.8, 0.2)),
+ ..Default::default()
+ };
if cutout {
camera.background_blur.mode = BackgroundBlurMode::Remove;
}