Skip to content

Conversation

@sanbox-irl
Copy link

I don't know too much about macros, so perhaps this is too noisy a change, but this simply allows calling toml::toml!{} without anything inside it, creating a blank toml::Value::Table.

In unit tests, it can read more clearly for an empty toml document when other tests nearby are constructing real data, and it has a very small footprint, so it doesn't seem like an issue in general.

Copy link
Member

@epage epage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a heads up, I'm trying to hold off on releasing 0.6 (master) without some specific changes. What we can do, once this is merged, is you can submit another PR that cherry-picks this commit to the toml-v0.5 branch and I can release that.

#[macro_export]
macro_rules! toml {
($($toml:tt)+) => {{
($($toml:tt)*) => {{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test case for empty tables?

@sanbox-irl
Copy link
Author

sounds great -- not sure i'm following re: cherry picking, but that's a future problem, for the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants