Skip to content

Commit 3645d92

Browse files
authored
Add default impl for instruction data struct (#32)
* Add default impl * Add changeset * Fix lint * Fix comment
1 parent d43493e commit 3645d92

File tree

17 files changed

+113
-0
lines changed

17 files changed

+113
-0
lines changed

.changeset/good-apricots-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@kinobi-so/renderers-rust": patch
3+
---
4+
5+
Add default impl for instruction data struct in Rust renderer

packages/renderers-rust/e2e/memo/src/generated/instructions/add_memo.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ impl AddMemoInstructionData {
4848
}
4949
}
5050

51+
impl Default for AddMemoInstructionData {
52+
fn default() -> Self {
53+
Self::new()
54+
}
55+
}
56+
5157
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
5258
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5359
pub struct AddMemoInstructionArgs {

packages/renderers-rust/e2e/system/src/generated/instructions/advance_nonce_account.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ impl AdvanceNonceAccountInstructionData {
6363
}
6464
}
6565

66+
impl Default for AdvanceNonceAccountInstructionData {
67+
fn default() -> Self {
68+
Self::new()
69+
}
70+
}
71+
6672
/// Instruction builder for `AdvanceNonceAccount`.
6773
///
6874
/// ### Accounts:

packages/renderers-rust/e2e/system/src/generated/instructions/allocate.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ impl AllocateInstructionData {
5555
}
5656
}
5757

58+
impl Default for AllocateInstructionData {
59+
fn default() -> Self {
60+
Self::new()
61+
}
62+
}
63+
5864
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
5965
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6066
pub struct AllocateInstructionArgs {

packages/renderers-rust/e2e/system/src/generated/instructions/allocate_with_seed.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ impl AllocateWithSeedInstructionData {
6262
}
6363
}
6464

65+
impl Default for AllocateWithSeedInstructionData {
66+
fn default() -> Self {
67+
Self::new()
68+
}
69+
}
70+
6571
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
6672
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6773
pub struct AllocateWithSeedInstructionArgs {

packages/renderers-rust/e2e/system/src/generated/instructions/assign.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ impl AssignInstructionData {
5656
}
5757
}
5858

59+
impl Default for AssignInstructionData {
60+
fn default() -> Self {
61+
Self::new()
62+
}
63+
}
64+
5965
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
6066
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6167
pub struct AssignInstructionArgs {

packages/renderers-rust/e2e/system/src/generated/instructions/assign_with_seed.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ impl AssignWithSeedInstructionData {
6262
}
6363
}
6464

65+
impl Default for AssignWithSeedInstructionData {
66+
fn default() -> Self {
67+
Self::new()
68+
}
69+
}
70+
6571
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
6672
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6773
pub struct AssignWithSeedInstructionArgs {

packages/renderers-rust/e2e/system/src/generated/instructions/authorize_nonce_account.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ impl AuthorizeNonceAccountInstructionData {
6464
}
6565
}
6666

67+
impl Default for AuthorizeNonceAccountInstructionData {
68+
fn default() -> Self {
69+
Self::new()
70+
}
71+
}
72+
6773
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
6874
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6975
pub struct AuthorizeNonceAccountInstructionArgs {

packages/renderers-rust/e2e/system/src/generated/instructions/create_account.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ impl CreateAccountInstructionData {
6161
}
6262
}
6363

64+
impl Default for CreateAccountInstructionData {
65+
fn default() -> Self {
66+
Self::new()
67+
}
68+
}
69+
6470
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
6571
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6672
pub struct CreateAccountInstructionArgs {

packages/renderers-rust/e2e/system/src/generated/instructions/create_account_with_seed.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ impl CreateAccountWithSeedInstructionData {
6969
}
7070
}
7171

72+
impl Default for CreateAccountWithSeedInstructionData {
73+
fn default() -> Self {
74+
Self::new()
75+
}
76+
}
77+
7278
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
7379
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
7480
pub struct CreateAccountWithSeedInstructionArgs {

0 commit comments

Comments
 (0)