Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

rustfmt crates/engine/tests/hdr_gamma_direction.rs (Format red on main since #801) (#842)

Brandon Thomas5c94c5e2b652
diff --git a/crates/engine/tests/hdr_gamma_direction.rs b/crates/engine/tests/hdr_gamma_direction.rs
index 3ab0830ae..932b3b4f1 100644
--- a/crates/engine/tests/hdr_gamma_direction.rs
+++ b/crates/engine/tests/hdr_gamma_direction.rs
@@ -9,11 +9,7 @@ use serde_json::json;
fn midtone_luma(gamma: f64) -> f64 {
let mut s = Session::new();
s.execute("file.new", json!({"width": 8, "height": 8, "background": "#808080"})).unwrap();
- s.execute(
- "image.adjustments.hdrToning",
- json!({"gamma": gamma, "strength": 0.1, "detail": 0, "saturation": 0, "radius": 30}),
- )
- .unwrap();
+ s.execute("image.adjustments.hdrToning", json!({"gamma": gamma, "strength": 0.1, "detail": 0, "saturation": 0, "radius": 30})).unwrap();
let p: Vec<f32> = serde_json::from_value(s.execute("document.pixel", json!({"x": 4, "y": 4})).unwrap()).unwrap();
f64::from(0.299 * p[0] + 0.587 * p[1] + 0.114 * p[2])
}