Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Clone Trait #141

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Added Clone Trait #141

merged 2 commits into from
Oct 22, 2024

Conversation

0xScratch
Copy link

Although, we have included most of the traits in the lesson but kind of missed the Clone trait which lets us use the .clone() method.

However, one might say there's no need to include this trait as it will help developers figure out themselves while going through this course but it's been clearly used in the video as well and somehow seems like a mistake by chance, not intentional. Still, feel free to make the end decision by merging or closing this PR!

This removes the errors one might get due to the unavailability of the `Clone` trait.
@@ -59,7 +59,7 @@ That will look like:
```rust
impl<AccountId, Balance> Pallet<AccountId, Balance>
where
AccountId: Ord,
AccountId: Ord + Clone,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well noticed @0xScratch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, thanks! 🚀

@@ -29,7 +29,7 @@ The more obvious use of traits is to define custom functions

Let's say we want to expose a function which returns the name of something.

You could a trait `GetName`:
You could define a trait `GetName`:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌🏻

@nomadbitcoin nomadbitcoin merged commit ac03b03 into w3b3d3v:web3dev-version Oct 22, 2024
1 check failed
@0xScratch 0xScratch deleted the patch-1 branch October 22, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants