summaryrefslogtreecommitdiff
path: root/src/info_file.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-06-01 21:48:15 +0200
committermo8it <mo8it@proton.me>2024-06-01 21:48:15 +0200
commit611f9d8722593430d82187aebee9db5cc6952da1 (patch)
tree1b2a0ef0728c27c1cfbd63135ed219775f6c1e64 /src/info_file.rs
parent8e9c99ae5bfd9212c7d2a2c78186ab82133e69c7 (diff)
Check that all solutions run successfully
Diffstat (limited to 'src/info_file.rs')
-rw-r--r--src/info_file.rs19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/info_file.rs b/src/info_file.rs
index 5ea487f..f226f73 100644
--- a/src/info_file.rs
+++ b/src/info_file.rs
@@ -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 {