mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-03-31 03:29:19 +00:00
Swap name and dir to stay consistent with the info file
This commit is contained in:
parent
2512701e2f
commit
9011d34987
@ -106,8 +106,8 @@ impl AppState {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Exercise {
|
Exercise {
|
||||||
dir: exercise_info.dir,
|
|
||||||
name: exercise_info.name,
|
name: exercise_info.name,
|
||||||
|
dir: exercise_info.dir,
|
||||||
path: exercise_info.path(),
|
path: exercise_info.path(),
|
||||||
canonical_path,
|
canonical_path,
|
||||||
test: exercise_info.test,
|
test: exercise_info.test,
|
||||||
@ -592,8 +592,8 @@ mod tests {
|
|||||||
|
|
||||||
fn dummy_exercise() -> Exercise {
|
fn dummy_exercise() -> Exercise {
|
||||||
Exercise {
|
Exercise {
|
||||||
dir: None,
|
|
||||||
name: "0",
|
name: "0",
|
||||||
|
dir: None,
|
||||||
path: String::from("exercises/0.rs"),
|
path: String::from("exercises/0.rs"),
|
||||||
canonical_path: None,
|
canonical_path: None,
|
||||||
test: false,
|
test: false,
|
||||||
|
|||||||
@ -66,8 +66,8 @@ fn run_bin(
|
|||||||
|
|
||||||
/// See `info_file::ExerciseInfo`
|
/// See `info_file::ExerciseInfo`
|
||||||
pub struct Exercise {
|
pub struct Exercise {
|
||||||
pub dir: Option<&'static str>,
|
|
||||||
pub name: &'static str,
|
pub name: &'static str,
|
||||||
|
pub dir: Option<&'static str>,
|
||||||
/// Path of the exercise file starting with the `exercises/` directory.
|
/// Path of the exercise file starting with the `exercises/` directory.
|
||||||
pub path: String,
|
pub path: String,
|
||||||
pub canonical_path: Option<String>,
|
pub canonical_path: Option<String>,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user