Skip to content

Commit

Permalink
tests: parasitic Packed sorted test
Browse files Browse the repository at this point in the history
  • Loading branch information
jordens committed Nov 19, 2024
1 parent 15fea09 commit 97f5c58
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion miniconf/tests/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
use miniconf::{json, Path, TreeDeserialize, TreeKey, TreeSerialize};
use miniconf::{json, Packed, Path, TreeDeserialize, TreeKey, TreeSerialize};

pub fn paths<M, const D: usize>() -> Vec<String>
where
M: TreeKey,
{
assert!(M::nodes::<_, D>()
.exact_size()
.collect::<Result<Vec<(Packed, _)>, _>>()
.unwrap()
.is_sorted());
M::nodes::<Path<String, '/'>, D>()
.exact_size()
.map(|pn| {
Expand Down

0 comments on commit 97f5c58

Please sign in to comment.