Browse Source

polish: make clippy happy on use_hook

Jonathan Kelley 3 years ago
parent
commit
a6e8852ced
1 changed files with 1 additions and 4 deletions
  1. 1 4
      packages/core/src/scopes.rs

+ 1 - 4
packages/core/src/scopes.rs

@@ -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();