File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -335,15 +335,14 @@ fn watch(
335335
336336 clear_screen ( ) ;
337337
338- let to_owned_hint = |t : & Exercise | t. hint . to_owned ( ) ;
339338 let failed_exercise_hint = match verify (
340339 exercises. iter ( ) ,
341340 ( 0 , exercises. len ( ) ) ,
342341 verbose,
343342 success_hints,
344343 ) {
345344 Ok ( _) => return Ok ( WatchStatus :: Finished ) ,
346- Err ( exercise) => Arc :: new ( Mutex :: new ( Some ( to_owned_hint ( exercise) ) ) ) ,
345+ Err ( exercise) => Arc :: new ( Mutex :: new ( Some ( exercise. hint . clone ( ) ) ) ) ,
347346 } ;
348347 spawn_watch_shell ( & failed_exercise_hint, Arc :: clone ( & should_quit) ) ;
349348 loop {
@@ -380,7 +379,7 @@ fn watch(
380379 Err ( exercise) => {
381380 let mut failed_exercise_hint =
382381 failed_exercise_hint. lock ( ) . unwrap ( ) ;
383- * failed_exercise_hint = Some ( to_owned_hint ( exercise) ) ;
382+ * failed_exercise_hint = Some ( exercise. hint . clone ( ) ) ;
384383 }
385384 }
386385 }
You can’t perform that action at this time.
0 commit comments