mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-09-29 02:03:29 +00:00
write input files to disk before running exercise
This commit is contained in:
committed by
Mo Bitar
parent
ca9b2b8582
commit
2cef23bb48
+9
-1
@@ -2,7 +2,10 @@ use anyhow::{Context, Error, Result, bail};
|
||||
use serde::Deserialize;
|
||||
use std::{fs, io::ErrorKind};
|
||||
|
||||
use crate::{embedded::EMBEDDED_FILES, exercise::RunnableExercise};
|
||||
use crate::{
|
||||
embedded::{EMBEDDED_FILES, InputFile},
|
||||
exercise::RunnableExercise,
|
||||
};
|
||||
|
||||
/// Deserialized from the `info.toml` file.
|
||||
#[derive(Deserialize)]
|
||||
@@ -72,6 +75,11 @@ impl RunnableExercise for ExerciseInfo<'_> {
|
||||
fn test(&self) -> bool {
|
||||
self.test
|
||||
}
|
||||
|
||||
fn embedded_input_files(&self) -> &[InputFile] {
|
||||
// We don't have the input files embedded for communtiy exercises.
|
||||
&[]
|
||||
}
|
||||
}
|
||||
|
||||
/// The deserialized `info.toml` file.
|
||||
|
||||
Reference in New Issue
Block a user