Skip to content

Commit 954889a

Browse files
committed
fix typos
1 parent 129e80b commit 954889a

18 files changed

+24
-24
lines changed

ARCHITECTURE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ on the tests.
6262

6363
Integration tests are used to test the public API.
6464
They are divided into two tests suite:
65-
- `api` contains free-standind tests
65+
- `api` contains freestanding tests
6666
- `h3` contains tests that are run against the H3 reference implementation
6767
(differential testing).
6868

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Possible sections are:
1717
### Fixed
1818

1919
- fix link to CHANGELOG in CONTRIBUTING
20-
- fix spelling in bbox
20+
- fix various typos
2121
- escape backslash in README
2222

2323
## [0.1.0] - 2023-01-09

fuzz/fuzz_targets/grid.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub struct Args {
1111
}
1212

1313
fuzz_target!(|args: Args| {
14-
// Avoir overly large output (very slow, OOM risk).
14+
// Avoid overly large output (very slow, OOM risk).
1515
if max_grid_disk_size(args.k) > 10_000 {
1616
return;
1717
}

src/coord/faceijk.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ impl FaceIJK {
516516

517517
// The center point is now in the same substrate grid as the origin
518518
// cell vertices.
519-
// Add the center point substate coordinates to each vertex to translate
519+
// Add the center point substrate coordinates to each vertex to translate
520520
// the vertices to that cell.
521521
for (i, vertex) in vertices.iter_mut().enumerate() {
522522
vertex.face = self.face;

src/coord/ijk_tests.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn from_ij_zero() {
1010
}
1111

1212
#[test]
13-
fn from_ij_rountrip() {
13+
fn from_ij_roundtrip() {
1414
for direction in Direction::iter() {
1515
let ijk = CoordIJK::new(0, 0, 0).neighbor(direction);
1616
let ij = CoordIJ::from(&ijk);
@@ -21,13 +21,13 @@ fn from_ij_rountrip() {
2121
}
2222

2323
#[test]
24-
fn from_cube_rountrip() {
24+
fn from_cube_roundtrip() {
2525
for direction in Direction::iter() {
2626
let ijk = CoordIJK::new(0, 0, 0).neighbor(direction);
2727
let cube = CoordCube::from(ijk);
2828
let recovered = CoordIJK::from(cube);
2929

30-
assert_eq!(ijk, recovered, "rountrip for direction {direction:?}");
30+
assert_eq!(ijk, recovered, "roundtrip for direction {direction:?}");
3131
}
3232
}
3333

src/coord/latlng.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ impl Eq for LatLng {}
397397

398398
impl PartialOrd for LatLng {
399399
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
400-
// Since our `PartialEq` use an epsilon, we must explicitely check for
400+
// Since our `PartialEq` use an epsilon, we must explicitly check for
401401
// equality before deferring to `f64::partial_cmp`.
402402
if self == other {
403403
return Some(Ordering::Equal);

src/coord/localij.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//!
88
//! - local coordinates are only comparable when they have the same origin
99
//! index.
10-
//! - local coordinates are only valid near the origin. Pratically, this is
10+
//! - local coordinates are only valid near the origin. Practically, this is
1111
//! within the same base cell or a neighboring base cell, except for
1212
//! pentagons.
1313
//! - the coordinate space may have deleted or warped regions due to pentagon

src/error/hex_grid.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{error::Error, fmt};
22

3-
/// Errors related to the `IJK` coordinate system and its varians (e.g.
3+
/// Errors related to the `IJK` coordinate system and its variants (e.g.
44
/// [`LocalIJ`](crate::LocalIJ)).
55
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66
pub struct HexGridError {

src/geom/geometry/bbox.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn compute_from_ring(
2929
for curr in ring {
3030
if !super::coord_is_valid(*curr) {
3131
return Err(InvalidGeometry::new(
32-
"invalide coordinate (e.g. infinite)",
32+
"invalid coordinate (e.g. infinite)",
3333
));
3434
}
3535

src/geom/geometry/ring.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<'a> Ring<'a> {
7373

7474
// If the latitude matches exactly, we'll hit an edge case where the
7575
// ray passes through the vertex twice on successive segment checks.
76-
// To avoid this, adjust the latiude northward if needed.
76+
// To avoid this, adjust the latitude northward if needed.
7777
//
7878
// NOTE: This currently means that a point at the north pole cannot
7979
// be contained in any polygon. This is acceptable in current usage,

src/geom/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
//! using radians) to make them compatible with the algorithms.
66
//!
77
//! The general idea here is to convert your `GeoRust` geometries before
8-
//! applying your H3O-related processings and, when you're done, convert back to
8+
//! applying your H3O-related processing and, when you're done, convert back to
99
//! a `GeoRust` type.
10-
//! That way, you'll pay the cost of the conversion/vality check only once
10+
//! That way, you'll pay the cost of the conversion/validity check only once
1111
//! (instead of every call). Moreover, some computations can be frontloaded and
1212
//! cached in the wrapper type.
1313

src/grid/iterator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl Iterator for DiskDistancesSafe {
8383

8484
// -----------------------------------------------------------------------------
8585

86-
/// Faillible, but faster, iterator over indexes within k distance of the origin.
86+
/// Fallible, but faster, iterator over indexes within k distance of the origin.
8787
pub struct DiskDistancesUnsafe {
8888
/// Starting point.
8989
origin: CellIndex,

src/index/cell.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const BASE_CELL: BaseCell = BaseCell::new_unchecked(2);
167167
/// - `C` are cells, coded on 3 bits each, with either a value in [0; 6] or the
168168
/// pattern `0b111` if unused.
169169
///
170-
/// Refrences:
170+
/// References:
171171
/// - [H3 Index Representations](https://h3geo.org/docs/core-library/h3Indexing)
172172
/// - [H3 Index Bit Layout](https://observablehq.com/@nrabinowitz/h3-index-bit-layout?collection=@nrabinowitz/h3)
173173
/// - [H3 Index Inspector](https://observablehq.com/@nrabinowitz/h3-index-inspector?collection=@nrabinowitz/h3)
@@ -884,7 +884,7 @@ impl CellIndex {
884884
where
885885
T: FromIterator<(Self, u32)>,
886886
{
887-
// Optimistically try the faster faillible algorithm first.
887+
// Optimistically try the faster fallible algorithm first.
888888
// If it fails, fall back to the slower always correct one.
889889
self.grid_disk_distances_fast(k)
890890
.collect::<Option<T>>()
@@ -1313,7 +1313,7 @@ impl CellIndex {
13131313
} else {
13141314
dir = origin_base_cell.direction(base_cell).ok_or_else(|| {
13151315
HexGridError::new(
1316-
"cannot unfold (base cells are not neighnors)",
1316+
"cannot unfold (base cells are not neighbors)",
13171317
)
13181318
})?;
13191319
base_cell
@@ -1545,7 +1545,7 @@ impl TryFrom<u64> for CellIndex {
15451545
// Basically a simpler/faster version of `h3IsValid`.
15461546
//
15471547
// Simpler because here we focus only on the trailing 56-bit part.
1548-
// Faster because no loops, just plain ol' bitwise operationss :)
1548+
// Faster because no loops, just plain ol' bitwise operations :)
15491549
fn try_from(value: u64) -> Result<Self, Self::Error> {
15501550
if (value >> 56) & 0b1000_0111 != 0 {
15511551
return Err(Self::Error::new(Some(value), "tainted reserved bits"));

src/index/edge.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl fmt::Display for Edge {
9191
/// - `E` is the edge of the origin cell, in [1; 6], coded on 3 bits (56-58).
9292
/// - `O` is the origin cell index, coded on 56 bits (0-55).
9393
///
94-
/// Refrences:
94+
/// References:
9595
/// - [H3 Index Representations](https://h3geo.org/docs/core-library/h3Indexing)
9696
/// - [H3 Index Bit Layout](https://observablehq.com/@nrabinowitz/h3-index-bit-layout?collection=@nrabinowitz/h3)
9797
/// - [H3 Index Inspector](https://observablehq.com/@nrabinowitz/h3-index-inspector?collection=@nrabinowitz/h3)

src/index/iterator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fn get_starting_state(index: CellIndex, resolution: Resolution) -> u64 {
126126
// If we have resolution between current and targeted one we clear their
127127
// directions.
128128
if range != 0 {
129-
// Mask with the righ number of bit to cover the directions.
129+
// Mask with the right number of bit to cover the directions.
130130
let mask = (1 << (range * DIRECTION_BITSIZE)) - 1;
131131
// Mask offset required to clear the directions.
132132
let offset = resolution.direction_offset();

src/index/vertex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl<'a> arbitrary::Arbitrary<'a> for Vertex {
138138
/// (56-58).
139139
/// - `O` is the owner cell index, coded on 56 bits (0-55).
140140
///
141-
/// Refrences:
141+
/// References:
142142
/// - [H3 Index Representations](https://h3geo.org/docs/core-library/h3Indexing)
143143
/// - [H3 Index Bit Layout](https://observablehq.com/@nrabinowitz/h3-index-bit-layout?collection=@nrabinowitz/h3)
144144
/// - [H3 Index Inspector](https://observablehq.com/@nrabinowitz/h3-index-inspector?collection=@nrabinowitz/h3)

src/resolution.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ impl<'a> arbitrary::Arbitrary<'a> for Resolution {
445445

446446
/// Same as an H3 index resolution, but can goes up to 16.
447447
///
448-
/// This extented range is required for some intermediate calculation.
448+
/// This extended range is required for some intermediate calculation.
449449
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
450450
pub struct ExtendedResolution(u8);
451451

tests/h3/cell_to_latlng.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ test!(res13, 0x8d1fb46622d85bf);
3636
test!(res14, 0x8e1fb46622d8597);
3737
test!(res15, 0x8f1fb46622d8591);
3838

39-
// Those ones triggered a bug where longitude wheren't in the right bounds.
39+
// Those ones triggered a bug where longitude weren't in the right bounds.
4040
test!(bound_bug1, 0x8400481ffffffff);
4141
test!(bound_bug2, 0x8471921ffffffff);
4242

0 commit comments

Comments
 (0)