Skip to content
Open
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
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ no-panic = { version = "0.1", optional = true }

[dev-dependencies]
num_cpus = "1.8"
rand = "0.9"
rand_xorshift = "0.4"
criterion = "0.5"
rand = "0.10"
rand_xorshift = "0.5"
criterion = "0.8"

[lib]
bench = false
Expand Down
3 changes: 3 additions & 0 deletions benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
clippy::unreadable_literal
)]

#[allow(deprecated)]
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use std::io::Write;

Expand All @@ -17,6 +18,7 @@ macro_rules! benches {
pub fn $name(c: &mut Criterion) {
let mut buf = ryu_js::Buffer::new();

#[allow(deprecated)]
c.bench_function(concat!("ryu_js_", stringify!($name)), move |b| b.iter(move || {
let value = black_box($value);
let formatted = buf.format_finite(value);
Expand All @@ -33,6 +35,7 @@ macro_rules! benches {
pub fn $name(c: &mut Criterion) {
let mut buf = Vec::with_capacity(20);

#[allow(deprecated)]
c.bench_function(concat!("std_fmt_", stringify!($name)), move |b| b.iter(|| {
buf.clear();
let value = black_box($value);
Expand Down
2 changes: 1 addition & 1 deletion examples/upstream_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// cargo run --example upstream_benchmark --release

use rand::{Rng, SeedableRng};
use rand::{RngExt, SeedableRng};

const SAMPLES: usize = 10000;
const ITERATIONS: usize = 1000;
Expand Down
2 changes: 1 addition & 1 deletion src/buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ impl Buffer {
}
}

#[allow(clippy::non_canonical_clone_impl)]
impl Clone for Buffer {
#[inline]
#[allow(clippy::non_canonical_clone_impl)] // false positive https://github.com/rust-lang/rust-clippy/issues/11072
fn clone(&self) -> Self {
Buffer::new()
}
Expand Down
1 change: 0 additions & 1 deletion src/f2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ pub fn f2d(ieee_mantissa: u32, ieee_exponent: u32) -> FloatingDecimal32 {
vr_is_trailing_zeros &= last_removed_digit == 0;
last_removed_digit = (vr % 10) as u8;
vr /= 10;
vp /= 10;
vm /= 10;
removed += 1;
}
Expand Down
1 change: 0 additions & 1 deletion tests/s2f_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
clippy::cast_lossless,
clippy::cast_possible_truncation,
clippy::cast_possible_wrap,
clippy::cast_possible_wrap,
clippy::cast_sign_loss,
clippy::checked_conversions,
clippy::float_cmp,
Expand Down
Loading