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 Option container from router data, provide method to use no router data #50

Merged
merged 3 commits into from Sep 16, 2021

Conversation

nilslice
Copy link
Contributor

This PR removes the Option from the RouteContext and Router types containing the user provided data which is to be shared amongst routes. This was a leftover artifact from a previous design and doesn't provide any useful functionality, so it's be re-worked and removed.

Additionally, the ctx.data() method which returns the Router data now returns a &D, so that we do not force any user to implement Clone on their type. If ownership of the data is required, users can implement Clone and call .clone() on their data within the route.

@nilslice nilslice merged commit 2877488 into main Sep 16, 2021
@nilslice nilslice deleted the sm/no-option-router branch September 16, 2021 20:47
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.

None yet

1 participant