-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Use OptionsIndex more internally in components
#11986
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
Use OptionsIndex more internally in components
#11986
Conversation
This updates various runtimes bits for components to use `OptionsIndex` more aggressively and ultimately deletes the old `Options` type. The `Options` type is a heavyweight package of all possible options which is effectively a duplication of what `OptionsIndex` points to, so that's removed in favor of directly accessing options.
| } | ||
|
|
||
| async fn write<D: 'static, P: Send + 'static, T: func::Lower + 'static, B: WriteBuffer<T>>( | ||
| instance: Option<Instance>, |
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.
@dicej your scrutiny here would be appreciated. I'm relatively sure this removal is "accurate", but I'm not sure if it should cascade in more removals as well (e.g. instance => _instance above as opposed to removing it entirely)
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.
Looks reasonable to me, and I would indeed cascade the removals. No point in passing unused parameters around.
| } | ||
|
|
||
| async fn write<D: 'static, P: Send + 'static, T: func::Lower + 'static, B: WriteBuffer<T>>( | ||
| instance: Option<Instance>, |
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.
Looks reasonable to me, and I would indeed cascade the removals. No point in passing unused parameters around.
Some follow-up work to delete more unnecessary parameter-passing.
This updates various runtimes bits for components to use
OptionsIndexmore aggressively and ultimately deletes the oldOptionstype. TheOptionstype is a heavyweight package of all possible options which is effectively a duplication of whatOptionsIndexpoints to, so that's removed in favor of directly accessing options.