polish: make clippy happy on use_hook
This commit is contained in:
1 parent
6e7015b997
commit
a6e8852ced
1 file changed
+1
-4
@@ -835,10 +835,7 @@ impl ScopeState {
|
||||
/// }
|
||||
/// ```
|
||||
#[allow(clippy::mut_from_ref)]
|
||||
pub fn use_hook<'src, State: 'static>(
|
||||
&'src self,
|
||||
initializer: impl FnOnce(usize) -> State,
|
||||
) -> &'src mut State {
|
||||
pub fn use_hook<State: 'static>(&self, initializer: impl FnOnce(usize) -> State) -> &mut State {
|
||||
let mut vals = self.hook_vals.borrow_mut();
|
||||
|
||||
let hook_len = vals.len();
|
||||
|
||||
Reference in new issue
Block a user