mirror of
https://github.com/chronotope/chrono.git
synced 2025-09-27 04:50:52 +00:00
CI: Lint benchmarks
This commit is contained in:
parent
2d2f1a9670
commit
31145976e1
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@ -29,10 +29,10 @@ jobs:
|
||||
cargo clippy --target=x86_64-pc-windows-msvc --all-targets --color=always \
|
||||
-- -D warnings
|
||||
- run: |
|
||||
cargo clippy --manifest-path fuzz/Cargo.toml --color=always \
|
||||
cargo clippy --manifest-path fuzz/Cargo.toml --all-targets --color=always \
|
||||
-- -D warnings
|
||||
- run: |
|
||||
cargo clippy --manifest-path bench/Cargo.toml --color=always \
|
||||
cargo clippy --manifest-path bench/Cargo.toml --all-targets --color=always \
|
||||
-- -D warnings
|
||||
env:
|
||||
RUSTFLAGS: "-Dwarnings"
|
||||
|
@ -208,7 +208,7 @@ fn bench_format_manual(c: &mut Criterion) {
|
||||
|
||||
fn bench_naivedate_add_signed(c: &mut Criterion) {
|
||||
let date = NaiveDate::from_ymd_opt(2023, 7, 29).unwrap();
|
||||
let extra = TimeDelta::days(25);
|
||||
let extra = TimeDelta::try_days(25).unwrap();
|
||||
c.bench_function("bench_naivedate_add_signed", |b| {
|
||||
b.iter(|| black_box(date).checked_add_signed(extra).unwrap())
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user