sorry - swapping from rustfmt to prettier-rust
This commit is contained in:
parent
281396f9ce
commit
c2c7e0bd52
93 changed files with 2797 additions and 2021 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use criterion::{ black_box, criterion_group, criterion_main, Criterion };
|
||||
use rltk::RGB;
|
||||
|
||||
/// Benchmarks methods from rltk used to desaturate non-visible tiles.
|
||||
|
|
@ -6,7 +6,7 @@ use rltk::RGB;
|
|||
// third alternative is directly setting the desaturated value, if it
|
||||
// is known in advance.
|
||||
fn nonvisible_benchmark(c: &mut Criterion) {
|
||||
let bg = black_box(RGB::from_f32(0.4, 0., 0.));
|
||||
let bg = black_box(RGB::from_f32(0.4, 0.0, 0.0));
|
||||
|
||||
c.bench_function("rgb -> greyscale", |b| b.iter(|| bg.to_greyscale()));
|
||||
c.bench_function("rgb -> desaturate", |b| b.iter(|| bg.desaturate()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue