Merge pull request #178 from autarch/autarch/spelling-fix
Fix misspelled variable name in usestate.rs
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -33,7 +33,7 @@ impl<T> ProvidedStateInner<T> {
|
||||
/// This hook provides some relatively light ergonomics around shared state.
|
||||
///
|
||||
/// It is not a substitute for a proper state management system, but it is capable enough to provide use_state - type
|
||||
/// ergonimics in a pinch, with zero cost.
|
||||
/// ergonomics in a pinch, with zero cost.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
|
||||
@@ -153,8 +153,8 @@ impl<T: 'static> UseState<T> {
|
||||
/// }
|
||||
/// ```
|
||||
pub fn modify(&self, f: impl FnOnce(&T) -> T) {
|
||||
let curernt = self.slot.borrow();
|
||||
let new_val = f(curernt.as_ref());
|
||||
let current = self.slot.borrow();
|
||||
let new_val = f(current.as_ref());
|
||||
(self.setter)(new_val);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user