From 40dbbb9725a8bfaf3757ee19b229cf0921f2be63 Mon Sep 17 00:00:00 2001 From: Richard Kiss Date: Sat, 16 Mar 2024 13:30:30 -0700 Subject: [PATCH] typos (#393) * typos --------- Co-authored-by: Arvid Norberg --- src/allocator.rs | 2 +- src/chia_dialect.rs | 2 +- src/more_ops.rs | 2 +- src/serde/read_cache_lookup.rs | 2 +- src/serde/tools.rs | 2 +- wheel/python/tests/test_program.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/allocator.rs b/src/allocator.rs index f0526db5..6ca76009 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -246,7 +246,7 @@ impl Allocator { pub fn restore_checkpoint(&mut self, cp: &Checkpoint) { // if any of these asserts fire, it means we're trying to restore to // a state that has already been "long-jumped" passed (via another - // restore to an earler state). You can only restore backwards in time, + // restore to an earlier state). You can only restore backwards in time, // not forwards. assert!(self.u8_vec.len() >= cp.u8s); assert!(self.pair_vec.len() >= cp.pairs); diff --git a/src/chia_dialect.rs b/src/chia_dialect.rs index f7ba2f6a..a5a3b2f3 100644 --- a/src/chia_dialect.rs +++ b/src/chia_dialect.rs @@ -72,7 +72,7 @@ impl Dialect for ChiaDialect { ) -> Response { let op_len = allocator.atom_len(o); if op_len == 4 { - // these are unkown operators with assigned cost + // these are unknown operators with assigned cost // the formula is: // +---+---+---+------------+ // | multiplier|XX | XXXXXX | diff --git a/src/more_ops.rs b/src/more_ops.rs index 16c69e81..19d73c2a 100644 --- a/src/more_ops.rs +++ b/src/more_ops.rs @@ -82,7 +82,7 @@ const PUBKEY_BASE_COST: Cost = 1325730; const PUBKEY_COST_PER_BYTE: Cost = 38; // the new coinid operator -// we subtract 153 cost as a discount, to incentivice using this operator rather +// we subtract 153 cost as a discount, to incentivize using this operator rather // than "naked" sha256 const COINID_COST: Cost = SHA256_BASE_COST + SHA256_COST_PER_ARG * 3 + SHA256_COST_PER_BYTE * (32 + 32 + 8) - 153; diff --git a/src/serde/read_cache_lookup.rs b/src/serde/read_cache_lookup.rs index f333a1d1..33c93de2 100644 --- a/src/serde/read_cache_lookup.rs +++ b/src/serde/read_cache_lookup.rs @@ -166,7 +166,7 @@ impl ReadCacheLookup { possible_responses } - /// If multiple paths exist, the lexigraphically smallest one will be returned. + /// If multiple paths exist, the lexicographically smallest one will be returned. pub fn find_path(&self, id: &Bytes32, serialized_length: u64) -> Option> { let mut paths = self.find_paths(id, serialized_length); if !paths.is_empty() { diff --git a/src/serde/tools.rs b/src/serde/tools.rs index c5841327..2a87de4d 100644 --- a/src/serde/tools.rs +++ b/src/serde/tools.rs @@ -16,7 +16,7 @@ pub fn serialized_length_from_bytes_trusted(b: &[u8]) -> io::Result { ops_counter -= 1; f.read_exact(&mut b)?; if b[0] == CONS_BOX_MARKER { - // we expect to parse two more items from the strem + // we expect to parse two more items from the stream // the left and right sub tree ops_counter += 2; } else if b[0] == BACK_REFERENCE { diff --git a/wheel/python/tests/test_program.py b/wheel/python/tests/test_program.py index a3495c95..52510a86 100644 --- a/wheel/python/tests/test_program.py +++ b/wheel/python/tests/test_program.py @@ -159,7 +159,7 @@ def test_uncurry_top_level_garbage(): def test_uncurry_not_pair(): - # the second item in the list is expected to be a pair, with a qoute + # the second item in the list is expected to be a pair, with a quote # `(a 1 (c (q . 1) (q . 1)))` plus = Program.fromhex("ff02ff01ffff04ffff0101ffff01018080") assert plus.uncurry() == (plus, None)