Skip to content

Commit 77a9c7d

Browse files
committed
style: cargo fmt
1 parent f2801c4 commit 77a9c7d

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

‎apps/desktop-gpui/kernels/benches/preset_preview.rs‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@ use cap_gpui_kernels::texture as candidate;
22
use image::RgbaImage;
33
use std::{hint::black_box, time::Instant};
44

5-
type Preview = fn(
6-
&[candidate::Filter],
7-
Option<candidate::Overlay>,
8-
f32,
9-
f32,
10-
u32,
11-
u32,
12-
) -> RgbaImage;
5+
type Preview =
6+
fn(&[candidate::Filter], Option<candidate::Overlay>, f32, f32, u32, u32) -> RgbaImage;
137

148
const SAMPLES: usize = 35;
159

‎apps/desktop-gpui/kernels/src/texture.rs‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,12 @@ fn grain_octave_row(yf: f32, freq: f32, seed: u32) -> GrainOctavePlan {
436436
let sy = fy * fy * (3. - 2. * fy);
437437
let y0 = y0 as i32;
438438
let seed_term = seed.wrapping_mul(2_246_822_519);
439-
let y_hash0 = (y0 as u32).wrapping_mul(668_265_263).wrapping_add(seed_term);
440-
let y_hash1 = ((y0 + 1) as u32).wrapping_mul(668_265_263).wrapping_add(seed_term);
439+
let y_hash0 = (y0 as u32)
440+
.wrapping_mul(668_265_263)
441+
.wrapping_add(seed_term);
442+
let y_hash1 = ((y0 + 1) as u32)
443+
.wrapping_mul(668_265_263)
444+
.wrapping_add(seed_term);
441445
GrainOctavePlan {
442446
sy,
443447
y_hash0,
@@ -479,8 +483,11 @@ pub fn preset_preview_bgra(
479483
let overlay_plan = overlay.map(|o| OverlayPlan::new(wf, hf, o));
480484
let vignette_plan = VignettePlan::new(wf, hf, vignette);
481485

482-
let prepared_filters: Vec<PreparedFilter> =
483-
filter.iter().copied().map(PreparedFilter::from_filter).collect();
486+
let prepared_filters: Vec<PreparedFilter> = filter
487+
.iter()
488+
.copied()
489+
.map(PreparedFilter::from_filter)
490+
.collect();
484491

485492
let mut scene_dx_sin = Vec::with_capacity(w as usize);
486493
for x in 0..w {

0 commit comments

Comments
 (0)