Skip to content

Commit

Permalink
serde: Use derives via feature, no more macro_use. (#790)
Browse files Browse the repository at this point in the history
We no longer need `#[macro_use] extern crate serde_derive;` as we
can just use the macros like normal in Rust 2018 and later.
  • Loading branch information
waywardmonkeys authored Jul 10, 2024
1 parent 986e1f2 commit 4446162
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ anes = "0.1.4"
once_cell = "1.14"
criterion-plot = { path = "plot", version = "0.5.0" }
itertools = ">=0.10, <=0.12"
serde = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_derive = "1.0"
ciborium = "0.2.0"
clap = { version = "=4.4.9", default-features = false, features = ["std", "help"] }
walkdir = "2.3"
Expand Down
1 change: 1 addition & 0 deletions src/connection.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::report::BenchmarkId as InternalBenchmarkId;
use crate::Throughput;
use serde::{Deserialize, Serialize};
use std::cell::RefCell;
use std::convert::TryFrom;
use std::io::{Read, Write};
Expand Down
1 change: 1 addition & 0 deletions src/csv_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use crate::measurement::ValueFormatter;
use crate::report::{BenchmarkId, MeasurementData, Report, ReportContext};
use crate::Throughput;
use csv::Writer;
use serde::Serialize;
use std::io::Write;
use std::path::Path;

Expand Down
1 change: 1 addition & 0 deletions src/estimate.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use serde::{Deserialize, Serialize};
use std::fmt;

use crate::stats::Distribution;
Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ extern crate approx;
extern crate quickcheck;

use regex::Regex;
use serde::{Deserialize, Serialize};

#[cfg(feature = "real_blackbox")]
extern crate test;

#[macro_use]
extern crate serde_derive;

// Needs to be declared before other modules
// in order to be usable there.
#[macro_use]
Expand Down
1 change: 1 addition & 0 deletions src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use crate::stats::univariate::Sample;
use crate::stats::Distribution;
use crate::{PlotConfiguration, Throughput};
use anes::{Attribute, ClearLine, Color, ResetAttributes, SetAttribute, SetForegroundColor};
use serde::{Deserialize, Serialize};
use std::cmp;
use std::collections::HashSet;
use std::fmt;
Expand Down

0 comments on commit 4446162

Please sign in to comment.