polish: make clippy happy on use_hook

This commit is contained in:
Jonathan Kelley committed 2022-06-30 15:41:45 -04:00
1 parent 6e7015b997
commit a6e8852ced
1 file changed
+1 -4
+1 -4
View File
@@ -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();