Skip to content

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

Merged
wchargin merged 2 commits intomasterfrom
wchargin-rust-remove-default-frus
Dec 5, 2020
Merged

rust: remove some ..Default::default()s#4424
wchargin merged 2 commits intomasterfrom
wchargin-rust-remove-default-frus

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