Skip to content

Commit 548aa3f

Browse files
committed
fix spelling
1 parent 415ff9e commit 548aa3f

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

rust/vote-tx-v2/src/gen_tx/builder.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! A Catalyst generalised vote transaction builder
1+
//! A Catalyst generalized vote transaction builder
22
33
use anyhow::ensure;
44

@@ -7,31 +7,31 @@ use crate::{encoded_cbor::EncodedCbor, uuid::Uuid, Cbor};
77

88
/// `GeneralizedTx` builder struct
99
#[allow(clippy::module_name_repetitions)]
10-
pub struct GeneralizedTxBuilder<ChoiceT, ProofT, ProopIdT, VoterDataT>
10+
pub struct GeneralizedTxBuilder<ChoiceT, ProofT, PropIdT, VoterDataT>
1111
where
1212
ChoiceT: for<'a> Cbor<'a>,
1313
ProofT: for<'a> Cbor<'a>,
14-
ProopIdT: for<'a> Cbor<'a>,
14+
PropIdT: for<'a> Cbor<'a>,
1515
VoterDataT: for<'a> Cbor<'a>,
1616
{
1717
/// The `vote_type` field
1818
vote_type: Uuid,
1919
/// The `event` field
2020
event: EventMap,
2121
/// The `votes` field
22-
votes: Vec<Vote<ChoiceT, ProofT, ProopIdT>>,
22+
votes: Vec<Vote<ChoiceT, ProofT, PropIdT>>,
2323
/// The `voter_data` field
2424
voter_data: VoterData<VoterDataT>,
2525
/// The `signature` builder field
2626
sign_builder: coset::CoseSignBuilder,
2727
}
2828

29-
impl<ChoiceT, ProofT, ProopIdT, VoterDataT>
30-
GeneralizedTxBuilder<ChoiceT, ProofT, ProopIdT, VoterDataT>
29+
impl<ChoiceT, ProofT, PropIdT, VoterDataT>
30+
GeneralizedTxBuilder<ChoiceT, ProofT, PropIdT, VoterDataT>
3131
where
3232
ChoiceT: for<'a> Cbor<'a> + Clone,
3333
ProofT: for<'a> Cbor<'a> + Clone,
34-
ProopIdT: for<'a> Cbor<'a> + Clone,
34+
PropIdT: for<'a> Cbor<'a> + Clone,
3535
VoterDataT: for<'a> Cbor<'a> + Clone,
3636
{
3737
/// Creates a new `GeneralizedTxBuilder` struct
@@ -64,7 +64,7 @@ where
6464
/// # Errors
6565
/// - `choices` array must has at least one entry-
6666
pub fn with_vote(
67-
mut self, choices: Vec<ChoiceT>, proof: ProofT, prop_id: ProopIdT,
67+
mut self, choices: Vec<ChoiceT>, proof: ProofT, prop_id: PropIdT,
6868
) -> anyhow::Result<Self> {
6969
ensure!(
7070
!choices.is_empty(),
@@ -82,7 +82,7 @@ where
8282
///
8383
/// # Errors
8484
/// - `votes` array must has at least one entry
85-
pub fn build(self) -> anyhow::Result<GeneralizedTx<ChoiceT, ProofT, ProopIdT, VoterDataT>> {
85+
pub fn build(self) -> anyhow::Result<GeneralizedTx<ChoiceT, ProofT, PropIdT, VoterDataT>> {
8686
ensure!(
8787
!self.votes.is_empty(),
8888
"`votes` array must has at least one entry"

rust/vote-tx-v2/src/gen_tx/event_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! A generalised tx event map struct.
1+
//! A generalized tx event map struct.
22
33
use minicbor::{data::Int, Decode, Decoder, Encode, Encoder};
44

rust/vote-tx-v2/src/gen_tx/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! A Catalyst generalised vote transaction object, structured following this
1+
//! A Catalyst generalized vote transaction object, structured following this
22
//! [spec](https://input-output-hk.github.io/catalyst-libs/architecture/08_concepts/catalyst_voting/gen_vote_tx/)
33
44
// cspell: words Coap
@@ -19,28 +19,28 @@ use crate::Cbor;
1919

2020
/// A generalized tx struct.
2121
#[derive(Debug, Clone, PartialEq)]
22-
pub struct GeneralizedTx<ChoiceT, ProofT, ProopIdT, VoterDataT>
22+
pub struct GeneralizedTx<ChoiceT, ProofT, PropIdT, VoterDataT>
2323
where
2424
ChoiceT: for<'a> Cbor<'a>,
2525
ProofT: for<'a> Cbor<'a>,
26-
ProopIdT: for<'a> Cbor<'a>,
26+
PropIdT: for<'a> Cbor<'a>,
2727
VoterDataT: for<'a> Cbor<'a>,
2828
{
2929
/// `tx-body` field
30-
tx_body: TxBody<ChoiceT, ProofT, ProopIdT, VoterDataT>,
30+
tx_body: TxBody<ChoiceT, ProofT, PropIdT, VoterDataT>,
3131
/// `signature` field
3232
signature: coset::CoseSign,
3333
}
3434

3535
/// `GeneralizedTx` array struct length
3636
const GENERALIZED_TX_LEN: u64 = 2;
3737

38-
impl<ChoiceT, ProofT, ProopIdT, VoterDataT> Decode<'_, ()>
39-
for GeneralizedTx<ChoiceT, ProofT, ProopIdT, VoterDataT>
38+
impl<ChoiceT, ProofT, PropIdT, VoterDataT> Decode<'_, ()>
39+
for GeneralizedTx<ChoiceT, ProofT, PropIdT, VoterDataT>
4040
where
4141
ChoiceT: for<'a> Cbor<'a>,
4242
ProofT: for<'a> Cbor<'a>,
43-
ProopIdT: for<'a> Cbor<'a>,
43+
PropIdT: for<'a> Cbor<'a>,
4444
VoterDataT: for<'a> Cbor<'a>,
4545
{
4646
fn decode(d: &mut Decoder<'_>, (): &mut ()) -> Result<Self, minicbor::decode::Error> {

rust/vote-tx-v2/src/gen_tx/tx_body.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! A generalised tx body struct.
1+
//! A generalized tx body struct.
22
33
use minicbor::{Decode, Decoder, Encode, Encoder};
44

@@ -13,19 +13,19 @@ pub type VoterData<T> = EncodedCbor<T>;
1313

1414
/// A tx body struct.
1515
#[derive(Debug, Clone, PartialEq)]
16-
pub struct TxBody<ChoiceT, ProofT, ProopIdT, VoterDataT>
16+
pub struct TxBody<ChoiceT, ProofT, PropIdT, VoterDataT>
1717
where
1818
ChoiceT: for<'a> Cbor<'a>,
1919
ProofT: for<'a> Cbor<'a>,
20-
ProopIdT: for<'a> Cbor<'a>,
20+
PropIdT: for<'a> Cbor<'a>,
2121
VoterDataT: for<'a> Cbor<'a>,
2222
{
2323
/// `vote-type` field
2424
pub(super) vote_type: Uuid,
2525
/// `event` field
2626
pub(super) event: EventMap,
2727
/// `votes` field
28-
pub(super) votes: Vec<Vote<ChoiceT, ProofT, ProopIdT>>,
28+
pub(super) votes: Vec<Vote<ChoiceT, ProofT, PropIdT>>,
2929
/// `voter-data` field
3030
pub(super) voter_data: VoterData<VoterDataT>,
3131
}

rust/vote-tx-v2/src/gen_tx/vote.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! A generalised tx vote struct.
1+
//! A generalized tx vote struct.
22
33
use minicbor::{Decode, Decoder, Encode};
44

@@ -16,18 +16,18 @@ pub type PropId<T> = EncodedCbor<T>;
1616

1717
/// A vote struct.
1818
#[derive(Debug, Clone, PartialEq)]
19-
pub struct Vote<ChoiceT, ProofT, ProopIdT>
19+
pub struct Vote<ChoiceT, ProofT, PropIdT>
2020
where
2121
ChoiceT: for<'a> Cbor<'a>,
2222
ProofT: for<'a> Cbor<'a>,
23-
ProopIdT: for<'a> Cbor<'a>,
23+
PropIdT: for<'a> Cbor<'a>,
2424
{
2525
/// `choices` field
2626
pub(super) choices: Vec<Choice<ChoiceT>>,
2727
/// `proof` field
2828
pub(super) proof: Proof<ProofT>,
2929
/// `prop-id` field
30-
pub(super) prop_id: PropId<ProopIdT>,
30+
pub(super) prop_id: PropId<PropIdT>,
3131
}
3232

3333
impl<ChoiceT, ProofT, PropIdT> Decode<'_, ()> for Vote<ChoiceT, ProofT, PropIdT>

0 commit comments

Comments
 (0)