Check that all solutions run successfully

This commit is contained in:
mo8it
2024-06-01 21:48:15 +02:00
parent 8e9c99ae5b
commit 611f9d8722
7 changed files with 169 additions and 86 deletions
+18 -1
View File
@@ -2,7 +2,7 @@ use anyhow::{bail, Context, Error, Result};
use serde::Deserialize;
use std::{fs, io::ErrorKind};
use crate::embedded::EMBEDDED_FILES;
use crate::{embedded::EMBEDDED_FILES, exercise::RunnableExercise};
/// Deserialized from the `info.toml` file.
#[derive(Deserialize)]
@@ -75,6 +75,23 @@ impl ExerciseInfo {
}
}
impl RunnableExercise for ExerciseInfo {
#[inline]
fn name(&self) -> &str {
&self.name
}
#[inline]
fn strict_clippy(&self) -> bool {
self.strict_clippy
}
#[inline]
fn test(&self) -> bool {
self.test
}
}
/// The deserialized `info.toml` file.
#[derive(Deserialize)]
pub struct InfoFile {