Skip to content

rust: remove some ..Default::default()s #4424

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

Merged
merged 2 commits into from
Dec 5, 2020

Conversation

wchargin
Copy link
Contributor

@wchargin wchargin commented Dec 4, 2020

Summary:
In #4399, we decided to recommend ..Default::default() on struct
initializers for protos whose source of truth is not in our repo. This
patch removes trivial ..Default::default()s from struct initializers
for tensorboard.data protos, which do live in our repo. We still use
it sometimes: e.g., some requests have a run_tag_filter field that we
don’t always care to set.

This patch will make it harder to add new fields to these protos, but
makes the code a bit easier to read in the meantime.

Test Plan:
Compilation suffices; unit tests are a nice sanity check.

wchargin-branch: rust-remove-default-frus

Summary:
In #4399, we decided to recommend `..Default::default()` on struct
initializers for protos whose source of truth is not in our repo. This
patch removes trivial `..Default::default()`s from struct initializers
for `tensorboard.data` protos, which *do* live in our repo. We still use
it sometimes: e.g., some requests have a `run_tag_filter` field that we
don’t always care to set.

This patch will make it harder to add new fields to these protos, but
makes the code a bit easier to read in the meantime.

Test Plan:
Compilation suffices; unit tests are a nice sanity check.

wchargin-branch: rust-remove-default-frus
wchargin-source: 8b007d8f650840dbf05c459a3414d9dd421170a8
wchargin-branch: rust-remove-default-frus
wchargin-source: a9aaeae06cd94d157a995ebfc4c87c8bc45fddc8
@wchargin wchargin added type:cleanup core:rustboard //tensorboard/data/server/... labels Dec 4, 2020
@wchargin wchargin requested a review from nfelt December 4, 2020 23:21
@google-cla google-cla bot added the cla: yes label Dec 4, 2020
@wchargin wchargin merged commit cc1dcfb into master Dec 5, 2020
@wchargin wchargin deleted the wchargin-rust-remove-default-frus branch December 5, 2020 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes core:rustboard //tensorboard/data/server/... type:cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants