Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use criterion::{criterion_group, criterion_main, Criterion};
use std::fmt::Display;
use std::hint;
use std::io::Write;
use std::{f32, f64};

fn do_bench(c: &mut Criterion, group_name: &str, float: impl ryu_js::Float + Display) {
let mut group = c.benchmark_group(group_name);
Expand All @@ -29,12 +28,12 @@ fn do_bench(c: &mut Criterion, group_name: &str, float: impl ryu_js::Float + Dis
fn bench(c: &mut Criterion) {
do_bench(c, "f64[0]", 0f64);
do_bench(c, "f64[short]", 0.1234f64);
do_bench(c, "f64[e]", f64::consts::E);
do_bench(c, "f64[e]", std::f64::consts::E);
do_bench(c, "f64[max]", f64::MAX);

do_bench(c, "f32[0]", 0f32);
do_bench(c, "f32[short]", 0.1234f32);
do_bench(c, "f32[e]", f32::consts::E);
do_bench(c, "f32[e]", std::f32::consts::E);
do_bench(c, "f32[max]", f32::MAX);
}

Expand Down
2 changes: 0 additions & 2 deletions tests/d2s_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#[macro_use]
mod macros;

use std::f64;

fn pretty(f: f64) -> String {
ryu_js::Buffer::new().format(f).to_owned()
}
Expand Down
2 changes: 0 additions & 2 deletions tests/f2s_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#[macro_use]
mod macros;

use std::f32;

fn pretty(f: f32) -> String {
ryu_js::Buffer::new().format(f).to_owned()
}
Expand Down
Loading