File tree Expand file tree Collapse file tree 6 files changed +8
-13
lines changed Expand file tree Collapse file tree 6 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -358,8 +358,7 @@ impl LanguagePlugin for CSharpPlugin {
358
358
|points| {
359
359
points
360
360
. into_iter ( )
361
- . map ( |p| p. split_whitespace ( ) )
362
- . flatten ( )
361
+ . flat_map ( |p| p. split_whitespace ( ) )
363
362
. collect ( )
364
363
} ,
365
364
) ( i)
Original file line number Diff line number Diff line change @@ -276,8 +276,7 @@ pub(crate) trait JavaPlugin: LanguagePlugin {
276
276
|points| {
277
277
points
278
278
. into_iter ( )
279
- . map ( |p| p. split_whitespace ( ) )
280
- . flatten ( )
279
+ . flat_map ( |p| p. split_whitespace ( ) )
281
280
. collect ( )
282
281
} ,
283
282
) ( i)
Original file line number Diff line number Diff line change @@ -467,8 +467,7 @@ impl LanguagePlugin for Python3Plugin {
467
467
|points| {
468
468
points
469
469
. into_iter ( )
470
- . map ( |p| p. split_whitespace ( ) )
471
- . flatten ( )
470
+ . flat_map ( |p| p. split_whitespace ( ) )
472
471
. collect ( )
473
472
} ,
474
473
) ( i)
Original file line number Diff line number Diff line change @@ -94,8 +94,7 @@ impl ProjectsConfig {
94
94
pub fn get_all_exercises ( & self ) -> impl Iterator < Item = & ProjectsDirExercise > {
95
95
self . courses
96
96
. iter ( )
97
- . map ( |c| & c. 1 . exercises )
98
- . flatten ( )
97
+ . flat_map ( |c| & c. 1 . exercises )
99
98
. map ( |e| e. 1 )
100
99
}
101
100
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ fn initialize_new_cache_clone(
187
187
file_util:: copy ( old_clone_path, new_course_root) ?;
188
188
189
189
let run_git = |args : & [ & str ] | {
190
- TmcCommand :: piped ( "git" . to_string ( ) )
190
+ TmcCommand :: piped ( "git" )
191
191
. with ( |e| e. cwd ( new_clone_path) . args ( args) )
192
192
. output_with_timeout_checked ( Duration :: from_secs ( 60 * 2 ) )
193
193
} ;
@@ -215,7 +215,7 @@ fn initialize_new_cache_clone(
215
215
log:: info!( "could not copy from previous cache, cloning" ) ;
216
216
217
217
// clone_repository
218
- TmcCommand :: piped ( "git" . to_string ( ) )
218
+ TmcCommand :: piped ( "git" )
219
219
. with ( |e| {
220
220
e. args ( & [ "clone" , "-q" , "-b" ] )
221
221
. arg ( course_git_branch)
@@ -304,7 +304,7 @@ fn get_exercises(
304
304
"processing points and checksum for {}" ,
305
305
exercise_dir. display( )
306
306
) ;
307
- let name = exercise_dir. to_string_lossy ( ) . replace ( "/" , "-" ) ;
307
+ let name = exercise_dir. to_string_lossy ( ) . replace ( '/' , "-" ) ;
308
308
let checksum = calculate_checksum ( & course_stub_path. join ( & exercise_dir) ) ?;
309
309
let exercise_path = course_clone_path. join ( & exercise_dir) ;
310
310
let points = super :: get_available_points ( & exercise_path) ?;
Original file line number Diff line number Diff line change @@ -593,8 +593,7 @@ pub fn update_exercises(
593
593
let exercise_ids = projects_config
594
594
. courses
595
595
. iter_mut ( )
596
- . map ( |c| & mut c. 1 . exercises )
597
- . flatten ( )
596
+ . flat_map ( |c| & mut c. 1 . exercises )
598
597
. map ( |e| e. 1 . id )
599
598
. collect :: < Vec < _ > > ( ) ;
600
599
You can’t perform that action at this time.
0 commit comments