Fix misspelled variable name in usestate.rs

This commit is contained in:
Dave Rolsky committed 2022-01-29 10:36:44 -06:00
1 parent 84ec87ab78
commit 3d3d18554d
1 file changed
+2 -2
+2 -2
View File
@@ -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);
}