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

Implement Clone for Iter/Values/Key of storage types #1121

Open
fadeevab opened this issue Dec 19, 2023 · 12 comments
Open

Implement Clone for Iter/Values/Key of storage types #1121

fadeevab opened this issue Dec 19, 2023 · 12 comments
Assignees
Labels

Comments

@fadeevab
Copy link

fadeevab commented Dec 19, 2023

Currently, cycle() is not possible to use, because Clone is not implemented for Iter.

let store = UnorderedMap::new(b'a');
store.iter().cycle(); // <--- ERROR

cycle() requires the iterator object to be clonable itself. Like it's implemented in the standard collections.

let store = vec![];
store.iter().cycle(); // <--- OK

Thank you!

@g4titanx
Copy link
Contributor

hi guys, i would love to work on this

Copy link

onlydustapp bot commented Jul 27, 2024

Hey @g4titanx!
Thanks for showing interest.
We've created an application for you to contribute to near-sdk-rs.
Go check it out on OnlyDust!

@g4titanx
Copy link
Contributor

Hey @g4titanx! Thanks for showing interest. We've created an application for you to contribute to near-sdk-rs. Go check it out on OnlyDust!

I wasn't able to apply thru ODhack
I would still love to work on it anyways

@frol frol added the ODHack label Jul 29, 2024
@frol
Copy link
Collaborator

frol commented Jul 29, 2024

@g4titanx Added ODHack label. Try now

@GideonBature
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a software engineer proficient with C, JavaScript, TypeScript, and Python. I started writing Rust a month ago, and from the issue, where cycle() method will need to iter() requires the iterator object to be clonable, I believe I should be able to resolve the issue.

How I plan on tackling this issue

  • I will first consult the documentation (Rust Book) and look up on the iter() method.
  • Make more research to see if there is anyway the iterator object from the iter() method be clonable.
  • Test whatsoever findings I get.
  • Keep at it until it works just fine and compiled successfully.

@g4titanx
Copy link
Contributor

@g4titanx Added ODHack label. Try now

alright

@g4titanx
Copy link
Contributor

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

i am a rust dev and i have experience contributing to rust based projects such as dojo.

How I plan on tackling this issue

  • see where the issue is, fix it and make a PR

@Jayse007
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a backend developer who specialises in django(a python module). I have intensive knowledge in Python and I reckon I can solve this problem.

How I plan on tackling this issue

I would make use of my intensive knowledge in Python and make more research to fix your problem and the problem isn't so complex. Desired results would be achieved in less than 48 hours.

@frol
Copy link
Collaborator

frol commented Jul 29, 2024

I selected @g4titanx for this challenge since he has extensive Rust experience which will be handy here

@g4titanx
Copy link
Contributor

g4titanx commented Jul 30, 2024

hi @frol , all the storage types are in this crate near-sdk/src/store, right?

@frol
Copy link
Collaborator

frol commented Jul 30, 2024

@g4titanx Yes, please

@g4titanx
Copy link
Contributor

okay, great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: NEW❗
Development

No branches or pull requests

5 participants