Skip to content

Commit 9011d34

Browse files
committed
Swap name and dir to stay consistent with the info file
1 parent 2512701 commit 9011d34

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/app_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ impl AppState {
106106
});
107107

108108
Exercise {
109-
dir: exercise_info.dir,
110109
name: exercise_info.name,
110+
dir: exercise_info.dir,
111111
path: exercise_info.path(),
112112
canonical_path,
113113
test: exercise_info.test,
@@ -592,8 +592,8 @@ mod tests {
592592

593593
fn dummy_exercise() -> Exercise {
594594
Exercise {
595-
dir: None,
596595
name: "0",
596+
dir: None,
597597
path: String::from("exercises/0.rs"),
598598
canonical_path: None,
599599
test: false,

src/exercise.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ fn run_bin(
6666

6767
/// See `info_file::ExerciseInfo`
6868
pub struct Exercise {
69-
pub dir: Option<&'static str>,
7069
pub name: &'static str,
70+
pub dir: Option<&'static str>,
7171
/// Path of the exercise file starting with the `exercises/` directory.
7272
pub path: String,
7373
pub canonical_path: Option<String>,

0 commit comments

Comments
 (0)