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

Refactor instantiation, vector layers #14

Merged
merged 1 commit into from
May 19, 2022
Merged

Refactor instantiation, vector layers #14

merged 1 commit into from
May 19, 2022

Conversation

nyurik
Copy link
Member

@nyurik nyurik commented May 18, 2022

fixes #10

  • Order fields according to the spec
  • Remove builder pattern because TileJSON is writable
  • use String instead of str when setting struct values - per Rust general recommendations
  • Add other fields for any unknown values in root and vector layers
  • Restructure instantiation (see Rework instantiation to be more useful and consistent with the spec #10)
    • use new(source) or new_ext(sources, version) to create TileJSON
    • use set_missing_defaults() to replace all missing values with their defaults (only if the spec defines it)
  • Remove id field because it is not supported by the spec
  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

cc: @maxammann

@nyurik nyurik requested a review from stepankuzmin May 18, 2022 21:23
* Order fields according to the spec
* Remove builder pattern because `TileJSON` is writable
* Add `other` fields for any unknown fields in root and vector layers
* Restructure instantiation:
  * use `new(source)` or `new_ext(sources, version)` to create `TileJSON`
  * use `set_missing_defaults()` to replace all missing values with their defaults (only if the spec defines it)
* Remove `id` field because it is not supported by the spec
Copy link
Collaborator

@stepankuzmin stepankuzmin left a comment

Choose a reason for hiding this comment

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

Good job 👍

@nyurik nyurik merged commit dba1a38 into georust:main May 19, 2022
@nyurik nyurik deleted the inst branch May 19, 2022 12:12
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.

Rework instantiation to be more useful and consistent with the spec
2 participants