Closed icefoxen closed 6 years ago
Thanks, I’m having a look!
Hm, I find it a bit hard to get what’s going on because of the diff with rustfmt
… I need to look closer.
I like the overall direction where this thing is heading. However, I’m still confused about the fact keys get impacted. I’ll try to see whether I can scratch another design so that they don’t.
Yeah like I said, the generic type for the context gets everywhere. Key<T>
need it because the T
needs to implement load()
methods that take the right Context
type. I haven't really come up with a good way around it yet.
I think it’s going to be a bit hard to merge this like that – I don’t really feel comfortable with the rustfmt
changes, and I prefer to have separate commits for formatting vs. real changes. However, if there’s a way to setup rustfmt
so that it has capitilized symbols first in the import list, I might consider using it as well.
With the current master
, you don’t have to type keys anymore, so that C
type doesn’t leak everywhere anymore.
Thanks for your PR! I’ve integrated your ideas in the the current HEAD
. I’ll release a new version soon.
Basically experimenting with redoing #4 with the current warmy. You end up with whatever your context generic type is propagating everywhere, which is a little nasty... but it actually ends up no more complicated to use, so.
Don't really expect you to merge, just wanted to show you this experiment.