Skip to content

Commit

Permalink
Remove FnBox (#7)
Browse files Browse the repository at this point in the history
Support latest nightly after
rust-lang/rust#62043 was merged.
  • Loading branch information
ramosbugs authored Jul 2, 2019
1 parent d46040b commit 84de18f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "datatest"
version = "0.3.2"
version = "0.3.3"
authors = ["Ivan Dubrov <[email protected]>"]
edition = "2018"
repository = "https://github.com/commure/datatest"
Expand Down
5 changes: 2 additions & 3 deletions src/data.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Support module for `#[datatest::data(..)]`
use serde::de::DeserializeOwned;
use std::boxed::FnBox;
use test::TDynBenchFn;
use yaml_rust::parser::Event;
use yaml_rust::scanner::Marker;
Expand All @@ -17,8 +16,8 @@ pub struct DataTestDesc {
/// Used internally for `#[datatest::data(..)]` tests.
#[doc(hidden)]
pub enum DataTestFn {
TestFn(Box<FnBox() + Send + 'static>),
BenchFn(Box<TDynBenchFn + 'static>),
TestFn(Box<dyn FnOnce() + Send + 'static>),
BenchFn(Box<dyn TDynBenchFn + 'static>),
}

/// Descriptor of the data test case where the type of the test case data is `T`.
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![feature(test)]
#![feature(specialization)]
#![feature(fnbox)]
#![feature(termination_trait_lib)]
//! Crate for supporting data-driven tests.
//!
Expand Down
2 changes: 1 addition & 1 deletion src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ fn adjust_for_test_name(opts: &mut crate::test::TestOpts, name: &str) {
/// For regular tests, mapping is one-to-one, for our data driven tests, we generate as many
/// descriptors as test cases we discovered.
#[doc(hidden)]
pub fn runner(tests: &[&TestDescriptor]) {
pub fn runner(tests: &[&dyn TestDescriptor]) {
let args = std::env::args().collect::<Vec<_>>();
let mut opts = match crate::test::parse_opts(&args) {
Some(Ok(o)) => o,
Expand Down

0 comments on commit 84de18f

Please sign in to comment.