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(
335
335
336
336
clear_screen ( ) ;
337
337
338
- let to_owned_hint = |t : & Exercise | t. hint . to_owned ( ) ;
339
338
let failed_exercise_hint = match verify (
340
339
exercises. iter ( ) ,
341
340
( 0 , exercises. len ( ) ) ,
342
341
verbose,
343
342
success_hints,
344
343
) {
345
344
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 ( ) ) ) ) ,
347
346
} ;
348
347
spawn_watch_shell ( & failed_exercise_hint, Arc :: clone ( & should_quit) ) ;
349
348
loop {
@@ -380,7 +379,7 @@ fn watch(
380
379
Err ( exercise) => {
381
380
let mut failed_exercise_hint =
382
381
failed_exercise_hint. lock ( ) . unwrap ( ) ;
383
- * failed_exercise_hint = Some ( to_owned_hint ( exercise) ) ;
382
+ * failed_exercise_hint = Some ( exercise. hint . clone ( ) ) ;
384
383
}
385
384
}
386
385
}
You can’t perform that action at this time.
0 commit comments