-
-
Notifications
You must be signed in to change notification settings - Fork 134
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 hierarchy helper functions #190
base: main
Are you sure you want to change the base?
Implement hierarchy helper functions #190
Conversation
import com.ramcosta.destinations.sample.destinations.TypedDestination | ||
import java.io.InvalidObjectException | ||
|
||
inline fun <reified T> Any.asRoute(): Route? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to me like an unnecessary pollution of the Any class. Could we make the type more specific or move the function to some other place instead of extending Any class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I deleted this file actually 🤔 guess I forgot it when I pushed. I'll correct this today! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nek-12 I can confirm this file was deleted in the final commit. The initial idea with this function was to convert a NavGraphSpec, DestinationSpec or String? into a Route? which as you can see by the types, have very little in common 😉 But nonetheless, thank you for pointing it out! I'll make sure to be more cautious in the future!
Hello @raamcosta, not sure how merging PR's work for you so sorry for tagging you for no reason if it's unnecessary.. This PR feels up to standard for me in terms of its contents, feel free to approve or reject it! There's probably a more elegant way of doing the same thing but hey, I'm learning the internals of your library (which I find really interesting by the way!) :) Thanks in advance |
Of course! Thank you so much for this PR 🙏 Thank you also for checking the code and liking it. There is quite a bit of messy parts in there that I wish I had time to clean up 😅 |
@MaxMichel2 sorry I still haven’t merged this, it is not forgotten. |
5185a19
to
7b51caa
Compare
Adds the #186 enhancement