-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Hex location use
hextree::Cell
type (#797)
* Update hextree dependency Update includes an implementation of TryFrom<i64> for Cell. This allows adding `#[sqlx(try_from = "i64")]` to struct fields of `hextree::Cell`. JayKickliter/HexTree#45 * Use `hextree::Cell` for BoostedHex and HexCoverage Got some advice from Jay to only use a `h3o::CellIndex` when you need to convert to/from a LatLng. So we went with `hextree::Cell` for the type. `hextree::Cell` is a loose wrapper around a u64. Parsing the value as early as possible tightens the gaurantee that we can make valid types that need use `Cell`s. It is also an attempt to remove discrepancies where some types carry a `i64` hex straight from a database, and other types carry a `u64` that were converted out of a database, even though they're goal is the same. (see previous commit where `#[sqlx(try_from = "i64")]` was enabled by the update to hextree).
- Loading branch information
1 parent
36ca129
commit 9c78cfa
Showing
9 changed files
with
122 additions
and
91 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.