diff --git a/Cargo.toml b/Cargo.toml index a6780de..9afbcf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/edn-rs/edn-rs" keywords = ["EDN", "no_std"] license = "MIT" edition = "2021" +resolver = "2" [lints.rust] rust_2018_idioms = "warn" diff --git a/tests/deserialize.rs b/tests/deserialize.rs index 3a09173..74b3b89 100644 --- a/tests/deserialize.rs +++ b/tests/deserialize.rs @@ -7,10 +7,8 @@ mod test { use edn_rs::{edn, from_edn, from_str, hmap, map, Edn, List, Map, Vector}; - fn err_as_string(s: &str) -> String { - let err = Edn::from_str(s).err().unwrap(); - format!("{err:?}") - } + mod common; + use crate::test::common::err_as_string; #[test] fn unit() { diff --git a/tests/deserialize_sets.rs b/tests/deserialize_sets.rs index aac780b..43e534d 100644 --- a/tests/deserialize_sets.rs +++ b/tests/deserialize_sets.rs @@ -9,10 +9,8 @@ mod test { use edn::{List, Vector}; use edn_rs::{edn, from_edn, from_str, hset, map, set, Edn, EdnError, Map, Set}; - fn err_as_string(s: &str) -> String { - let err = Edn::from_str(s).err().unwrap(); - format!("{err:?}") - } + mod common; + use crate::test::common::err_as_string; #[test] fn parse_set_with_commas() { diff --git a/tests/lib.rs b/tests/lib.rs deleted file mode 100644 index 2e6f166..0000000 --- a/tests/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![recursion_limit = "512"] - -extern crate alloc; -#[cfg(feature = "std")] -extern crate std; - -pub mod deserialize; -pub mod deserialize_sets; -pub mod emit; -pub mod emit_json; -pub mod error_messages; -pub mod parse; -pub mod parse_sets; -pub mod ser; diff --git a/tests/ser.rs b/tests/ser.rs index 0e27876..6444627 100644 --- a/tests/ser.rs +++ b/tests/ser.rs @@ -1,3 +1,5 @@ +#![recursion_limit = "512"] + #[cfg(test)] mod tests { use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; diff --git a/tests/test/common.rs b/tests/test/common.rs new file mode 100644 index 0000000..d34f8ef --- /dev/null +++ b/tests/test/common.rs @@ -0,0 +1,7 @@ +use core::str::FromStr; +use edn_rs::Edn; + +pub fn err_as_string(s: &str) -> String { + let err = Edn::from_str(s).err().unwrap(); + format!("{err:?}") +}