Remove attr matcher from test and bench macro
Formerly needed for conditional i128 support.
This commit is contained in:
parent
2581c8cee7
commit
6b06fb04f7
|
@ -5,16 +5,10 @@
|
||||||
extern crate test;
|
extern crate test;
|
||||||
|
|
||||||
macro_rules! benches {
|
macro_rules! benches {
|
||||||
(
|
($($name:ident($value:expr)),*) => {
|
||||||
$(
|
|
||||||
$(#[$attr:meta])*
|
|
||||||
$name:ident($value:expr)
|
|
||||||
),*
|
|
||||||
) => {
|
|
||||||
mod bench_itoa_format {
|
mod bench_itoa_format {
|
||||||
use test::{Bencher, black_box};
|
use test::{Bencher, black_box};
|
||||||
$(
|
$(
|
||||||
$(#[$attr])*
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn $name(b: &mut Bencher) {
|
fn $name(b: &mut Bencher) {
|
||||||
let mut buffer = itoa::Buffer::new();
|
let mut buffer = itoa::Buffer::new();
|
||||||
|
@ -30,7 +24,6 @@ macro_rules! benches {
|
||||||
mod bench_std_fmt {
|
mod bench_std_fmt {
|
||||||
use test::{Bencher, black_box};
|
use test::{Bencher, black_box};
|
||||||
$(
|
$(
|
||||||
$(#[$attr])*
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn $name(b: &mut Bencher) {
|
fn $name(b: &mut Bencher) {
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
|
@ -2,14 +2,8 @@
|
||||||
#![allow(clippy::cast_lossless, clippy::unseparated_literal_suffix)]
|
#![allow(clippy::cast_lossless, clippy::unseparated_literal_suffix)]
|
||||||
|
|
||||||
macro_rules! test {
|
macro_rules! test {
|
||||||
(
|
($($name:ident($value:expr, $expected:expr)),*) => {
|
||||||
$(
|
$(
|
||||||
$(#[$attr:meta])*
|
|
||||||
$name:ident($value:expr, $expected:expr)
|
|
||||||
),*
|
|
||||||
) => {
|
|
||||||
$(
|
|
||||||
$(#[$attr])*
|
|
||||||
#[test]
|
#[test]
|
||||||
fn $name() {
|
fn $name() {
|
||||||
let mut buffer = itoa::Buffer::new();
|
let mut buffer = itoa::Buffer::new();
|
||||||
|
|
Loading…
Reference in New Issue