File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
tmc-langs-util/src/task_executor Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -322,17 +322,8 @@ fn get_exercises(
322322fn calculate_checksum ( exercise_dir : & Path ) -> Result < String , UtilError > {
323323 let mut digest = Context :: new ( ) ;
324324
325- for entry in WalkDir :: new ( exercise_dir)
326- . sort_by ( |a, b| a. file_name ( ) . cmp ( b. file_name ( ) ) ) // order filenames for a consistent hash
327- . into_iter ( )
328- . filter_entry ( |e| {
329- // filter out files starting with '.'
330- !e. file_name ( )
331- . to_str ( )
332- . map ( |e| e. starts_with ( '.' ) )
333- . unwrap_or_default ( )
334- } )
335- {
325+ // order filenames for a consistent hash
326+ for entry in WalkDir :: new ( exercise_dir) . sort_by ( |a, b| a. file_name ( ) . cmp ( b. file_name ( ) ) ) {
336327 let entry = entry?;
337328 let relative = entry. path ( ) . strip_prefix ( exercise_dir) . unwrap ( ) ;
338329 let string = relative. as_os_str ( ) . to_string_lossy ( ) ;
@@ -650,6 +641,6 @@ courses:
650641 let checksum =
651642 calculate_checksum ( Path :: new ( "tests/data/course_refresher/valid_exercises/ex1" ) )
652643 . unwrap ( ) ;
653- assert_eq ! ( checksum, "1830118f2570f3448c0e096a7369b127 " ) ;
644+ assert_eq ! ( checksum, "6cacf02f21f9242674a876954132fb11 " ) ;
654645 }
655646}
You can’t perform that action at this time.
0 commit comments