Skip to content

Commit

Permalink
mdBook generated from gitorial
Browse files Browse the repository at this point in the history
  • Loading branch information
shawntabrizi committed Aug 4, 2024
1 parent 36fc18c commit 374eeb7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 5 additions & 3 deletions src/26/solution/solution.diff
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
diff --git a/src/impls.rs b/src/impls.rs
index 71d00d9..5ec04ae 100644
index 6ae2e34..5ec04ae 100644
--- a/src/impls.rs
+++ b/src/impls.rs
@@ -20,7 +20,6 @@ impl<T: Config> Pallet<T> {
@@ -20,8 +20,7 @@ impl<T: Config> Pallet<T> {
}

pub fn mint(owner: T::AccountId, dna: [u8; 32]) -> DispatchResult {
- /* 🚧 TODO 🚧: Add the `price` field set to `None` when initializing the `Kitty` struct. */
let kitty = Kitty { dna, owner: owner.clone(), price: None };
- let kitty = Kitty { dna, owner: owner.clone() };
+ let kitty = Kitty { dna, owner: owner.clone(), price: None };
// Check if the kitty does not already exist in our storage map
ensure!(!Kitties::<T>::contains_key(dna), Error::<T>::DuplicateKitty);

diff --git a/src/lib.rs b/src/lib.rs
index efd55a6..f2625a6 100644
--- a/src/lib.rs
Expand Down
2 changes: 1 addition & 1 deletion src/26/template/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl<T: Config> Pallet<T> {

pub fn mint(owner: T::AccountId, dna: [u8; 32]) -> DispatchResult {
/* 🚧 TODO 🚧: Add the `price` field set to `None` when initializing the `Kitty` struct. */
let kitty = Kitty { dna, owner: owner.clone(), price: None };
let kitty = Kitty { dna, owner: owner.clone() };
// Check if the kitty does not already exist in our storage map
ensure!(!Kitties::<T>::contains_key(dna), Error::<T>::DuplicateKitty);

Expand Down
8 changes: 3 additions & 5 deletions src/26/template/template.diff
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
diff --git a/src/impls.rs b/src/impls.rs
index a638a8c..71d00d9 100644
index a638a8c..6ae2e34 100644
--- a/src/impls.rs
+++ b/src/impls.rs
@@ -20,7 +20,8 @@ impl<T: Config> Pallet<T> {
@@ -20,6 +20,7 @@ impl<T: Config> Pallet<T> {
}

pub fn mint(owner: T::AccountId, dna: [u8; 32]) -> DispatchResult {
- let kitty = Kitty { dna, owner: owner.clone() };
+ /* 🚧 TODO 🚧: Add the `price` field set to `None` when initializing the `Kitty` struct. */
+ let kitty = Kitty { dna, owner: owner.clone(), price: None };
let kitty = Kitty { dna, owner: owner.clone() };
// Check if the kitty does not already exist in our storage map
ensure!(!Kitties::<T>::contains_key(dna), Error::<T>::DuplicateKitty);

diff --git a/src/lib.rs b/src/lib.rs
index 7305ab6..efd55a6 100644
--- a/src/lib.rs
Expand Down

0 comments on commit 374eeb7

Please sign in to comment.