Skip to content

Clone trait on gloo structs #181

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

Closed
nydrani opened this issue Jan 4, 2022 · 0 comments · Fixed by #184
Closed

Clone trait on gloo structs #181

nydrani opened this issue Jan 4, 2022 · 0 comments · Fixed by #184

Comments

@nydrani
Copy link

nydrani commented Jan 4, 2022

Summary

I was wondering why some of the structs in your api arent cloneable. The same with the other derived traits: PartialEq and Eq. The ones in particular are the File and Blob structs in the gloo_file. crate.

Motivation

It would be nice to be able to clone those structs.

Detailed Explanation

It looks like all the structs that bind to the web api in web-sys have this #[derive(Debug, Clone, PartialEq, Eq)] derive macro on them which means they shuold be fine to be cloned. It looks like File and Blob are simple wrappers around their respective structs in the web-sys crate. Is there a reason for why these structs should be not be clonable too?

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 a pull request may close this issue.

1 participant