Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add topology to validator #149

Merged
merged 9 commits into from
Mar 17, 2020

Conversation

futurechimp
Copy link
Contributor

No description provided.

service_providers: Vec::<presence::ServiceProvider>::new(),
validators: Vec::<presence::Validator>::new(),
};
let response = serde_json::to_string_pretty(&topology).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason we prettify the response rather than just use to_string ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just like emitting pretty json wherever possible.

serde = "1.0.104"
serde_derive = "1.0.104"
Copy link
Contributor

Choose a reason for hiding this comment

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

We definitely don't need to import serde_derive as seperate dependency as everything is already included in base serde (as long as we use correct features). I think the same might be true for serde_json but I haven't tested that claim

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch on the dervive. It looks the serde_json is needed.

@jstuczyn jstuczyn merged commit 6254169 into develop Mar 17, 2020
@jstuczyn jstuczyn deleted the feature/add-topology-to-validator branch March 17, 2020 11:02
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.

None yet

2 participants