We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c54ff7 commit 174d139Copy full SHA for 174d139
1 file changed
packages/yew/tests/use_state.rs
@@ -2,7 +2,6 @@
2
3
mod common;
4
5
-use std::rc::Rc;
6
use std::time::Duration;
7
8
use common::obtain_result;
@@ -17,7 +16,7 @@ async fn use_state_works() {
17
16
#[function_component(UseComponent)]
18
fn use_state_comp() -> Html {
19
let counter = use_state(|| 0);
20
- assert_eq!(counter.get(), Rc::new(0));
+ assert_eq!(*counter.get(), *counter);
21
if *counter < 5 {
22
counter.set(*counter + 1)
23
}
0 commit comments