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

some lets in Requests were vars by accident #163

Merged
merged 1 commit into from
Feb 11, 2020

Conversation

weissi
Copy link
Contributor

@weissi weissi commented Feb 10, 2020

Motivation:

Generally, most members in structs should be var but in this particular case, let makes more sense (for now) because there are other properties (like kind) that are generated from things like host/port/scheme. If we allow scheme to become var, then we would need to update kind when changed, however that wasn't done.

Also, the var functionality wasn't tested and therefore we should restore the behaviour of 1.0.1 which was to store them as lets.

Modification:

make the method, url, and scheme members of Request a let.

Result:

Harder to make an illegal Request value.

@weissi weissi merged commit f648c04 into swift-server:master Feb 11, 2020
@weissi weissi deleted the jw-var-by-accident branch February 11, 2020 12:33
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