tailhook / rust-quire

A YAML-based configuration library for Rust
https://docs.rs/quire/
Other
13 stars 5 forks source link

Item lists example #21

Closed stappersg closed 4 years ago

stappersg commented 4 years ago

New file: examples/item_lists.rs, compiles New file: examples/journey.yaml, item_lists can't read it.

Included / commited for getting help on getting it working.

tailhook commented 4 years ago

I would help faster if you provide an error message. Most likely the issue is that validator should use a sequence of scalars rather than a scalar:

fn validator() -> Structure<'static> {
    Structure::new()
    .member("name", Scalar::new())
    .member("year", Scalar::new())
    .member("team", Sequence::new(Scalar::new()))
}
stappersg commented 4 years ago

Seen the hint, thanks.

Expect to see an updated pull request. It will be for a non master branch like serde or staging. Yes, it would be nice to have a staging branch ;-)

stappersg commented 4 years ago

Closing this PR because superseeded by PR #24. It does have error message about non iterable item list ...