DioxusLabs / DioxusLabs/dioxus
Update Config::context_providers to use Box instead of Arc
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
I stumbled across this comment in the code for packages/server/src/Config.rs... just wondering if it's getting (been??) picked up for v0.7??
```rust
pub fn context_providers(mut self, state: ContextProviders) -> Self {
// This API should probably accept Vec Box + Send + Sync + 'static>> instead of Arc so we can
// continue adding to the context list after calling this method. Changing the type is a breaking change so it cannot
// be done until 0.7 is released.
let context_providers = (0..state.len()).map(|i| {
let state = state.clone();
Arc::new(move || state[i]()) as Arc Box + Send + Sync>
});
self.context_providers.extend(context_providers);
self
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.