Skip to content

Commit

Permalink
fix(typos): Checked spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
clint committed Dec 20, 2023
1 parent 082f556 commit 36e5420
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ jobs:
run: |
cargo clippy --package starknet-crypto --no-default-features -- -D warnings
cargo clippy --package starknet-crypto --no-default-features --features alloc -- -D warnings
# https://github.com/crate-ci/typos/blob/master/docs/github-action.md
- name: Check spelling
uses: crate-ci/typos@master
2 changes: 1 addition & 1 deletion starknet-core/src/types/contract/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub struct LegacyProgram {
pub attributes: Option<Vec<LegacyAttribute>>,
pub builtins: Vec<String>,
// This field was introduced in Cairo 0.10.0. By making it optional we're keeping compatibility
// with older artifacts. This decision should be reviewd in the future.
// with older artifacts. This decision should be reviewed in the future.
#[serde(skip_serializing_if = "Option::is_none")]
pub compiler_version: Option<String>,
#[serde_as(as = "Vec<UfeHex>")]
Expand Down
6 changes: 3 additions & 3 deletions starknet-crypto/src/rfc6979.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub fn generate_k(

// Modified from upstream `rfc6979::generate_k` with a hard-coded right bit shift. The more
// idiomatic way of doing this seems to be to implement `U252` which handles bit truncation
// interally.
// internally.
// TODO: change to use upstream `generate_k` directly.
#[inline]
fn generate_k_shifted<D, I>(x: &I, n: &I, h: &ByteArray<I>, data: &[u8]) -> Zeroizing<I>
Expand Down Expand Up @@ -87,7 +87,7 @@ mod tests {
use serde::Deserialize;

#[derive(Deserialize)]
struct Rfc6979TestVecotr<'a> {
struct Rfc6979TestVector<'a> {
msg_hash: &'a str,
priv_key: &'a str,
seed: &'a str,
Expand All @@ -109,7 +109,7 @@ mod tests {
}

fn test_generate_k_from_json_str(json_str: &'static str) {
let test_vectors: Vec<Rfc6979TestVecotr> = serde_json::from_str(json_str).unwrap();
let test_vectors: Vec<Rfc6979TestVector> = serde_json::from_str(json_str).unwrap();

for test_vector in test_vectors.iter() {
let msg_hash = field_element_from_be_hex(test_vector.msg_hash);
Expand Down
2 changes: 1 addition & 1 deletion starknet-providers/src/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
};

/// A convenient Box-able type that implements the [Provider] trait. This can be useful when you
/// want to accept any built-in provider implementation from the library in your appliation, since
/// want to accept any built-in provider implementation from the library in your application, since
/// the [Provider] trait itself cannot be Box-ed due to the use of associated type.
///
/// A recommended pattern is to make your business logic code (e.g. functions) generic over the
Expand Down
4 changes: 2 additions & 2 deletions starknet-providers/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ pub trait Provider {
.await?;

if result.len() == 1 {
// Unwrapping here is safe becuase we already checked length
// Unwrapping here is safe because we already checked length
Ok(result.pop().unwrap())
} else {
Err(ProviderError::ArrayLengthMismatch)
Expand Down Expand Up @@ -284,7 +284,7 @@ pub trait Provider {
.await?;

if result.len() == 1 {
// Unwrapping here is safe becuase we already checked length
// Unwrapping here is safe because we already checked length
Ok(result.pop().unwrap())
} else {
Err(ProviderError::ArrayLengthMismatch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ pub enum TransactionStatus {
NotReceived,
/// Transaction was received by the sequenced
Received,
/// Transaction passed teh validation and entered the pending block
/// Transaction passed the validation and entered the pending block
Pending,
/// The transaction failed validation and was skipped (applies both to a
/// pending and actual created block)
Rejected,
Reverted,
/// Transaction passed teh validation and entered a created block
/// Transaction passed the validation and entered a created block
AcceptedOnL2,
/// Transaction was accepted on-chain
AcceptedOnL1,
Expand Down
8 changes: 8 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[files]
extend-exclude = ["*.tsv", "*.json", "*.txt"]

[default.extend-words]
# Ignore false-positives

[default.extend-identifiers]
# *sigh* this just isn't worth the cost of fixing

0 comments on commit 36e5420

Please sign in to comment.