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

Remove Drop bound from Task trait #1627

Merged
merged 3 commits into from
Oct 21, 2020
Merged

Remove Drop bound from Task trait #1627

merged 3 commits into from
Oct 21, 2020

Conversation

siku2
Copy link
Member

@siku2 siku2 commented Oct 21, 2020

Description

Rust now emits a warning for Drop bounds. This PR simply removes it from the Task trait and updates the documentation. A type implementing Task doesn't necessarily need to implement Drop itself to fulfil the invariant. Especially with web-sys / glee types that already clean up when dropped there's no need for the task itself to implement Drop as well.

I also removed the long redundant to_ms function and made it so the methods panic instead of truncating when duration is too big. This technically makes this a breaking change but I'm 99% sure that no one is currently relying on this behaviour :D

Checklist

  • I have run cargo make pr-flow
  • I have reviewed my own code

@siku2 siku2 added this to the v0.18 milestone Oct 21, 2020
@siku2 siku2 merged commit 8052e56 into yewstack:master Oct 21, 2020
@siku2 siku2 deleted the task-drop branch October 21, 2020 14:40
@jstarry
Copy link
Member

jstarry commented Oct 21, 2020

glee

sounds more fun than gloo, shall we change it? 😉

@siku2
Copy link
Member Author

siku2 commented Oct 21, 2020

Ah whoops, gloo is such a good play on "glue" (at least I hope that's what it is 😅) and I still manage to confuse it with a TV show I never even watched 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants