You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, after digging around a little bit, I discovered that these methods do not actually require mutable access to any internal state (everything is already synchronized), so we can actually relax these methods to take &self.
This will be helpful for use-cases like the fluvio-client-wasm wrapper around the Admin API, because we can reduce the wrapper code from Rc<RefCell<FluvioAdmin>> (which is currently causing panics due to multiple borrowing of RefCell) down to Rc<FluvioAdmin>.
The text was updated successfully, but these errors were encountered:
Closes#1178. Will help to prevent bugs like infinyon/fluvio-client-wasm#42
- Changes `&mut self` to `&self` for `create`, `delete`, and `list` methods on `FluvioAdmin`.
Right now, the methods on the FluvioAdmin client all take
&mut self
reference:However, after digging around a little bit, I discovered that these methods do not actually require mutable access to any internal state (everything is already synchronized), so we can actually relax these methods to take
&self
.This will be helpful for use-cases like the
fluvio-client-wasm
wrapper around the Admin API, because we can reduce the wrapper code fromRc<RefCell<FluvioAdmin>>
(which is currently causing panics due to multiple borrowing of RefCell) down toRc<FluvioAdmin>
.The text was updated successfully, but these errors were encountered: