Veetaha's amendments for #[builder(getter)]
#226
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followup for #222
Did the following changes:
typos
to pre-commit hook andinit.sh
as well. Updatedtypos
version, fixed some new typos.#![no_std]
compatible#[builder(getter, default)]
attributes combotrybuild
tests to make sure methods aren't accessible until values are set, and mutual exclusion checks work#[must_use]
to getters. Added a negative test towarnings.rs
test case to make sure it works.validate_mutually_exclusive
. All other attributes such asfinish_fn
,start_fn
,skip
already have their ownvalidate_mutually_alllowed
blocks, so they already rejectgetter
with them.getter.rs
togetters.rs
, because I expect it will be possible to generate multiple getters in the future.let-else
with an explicitlet-match
).Getters
page to the Typestate API guide section#[builder(getter)]
reference page. Added examples of how it works for optional members. Removed some redundancies and copy-paste mistakes.builder.md
nightly
and they are almost always green there. The only breakage from the version update may happen intrybuild
tests, which would only require updating thetrybuild
test snapshots withTRYBUILD=overwrite cargo t --all-features