mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-06 10:03:30 +02:00
Check that all solutions run successfully
This commit is contained in:
+18
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user