summaryrefslogtreecommitdiff
path: root/src/info_file.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-05-13 01:25:38 +0200
committermo8it <mo8it@proton.me>2024-05-13 01:25:38 +0200
commit11fda5d70f568e0f528d91dd573447719abe05f4 (patch)
tree683a2d1a8f807ea40908ef6c7a61c962e71d1d8b /src/info_file.rs
parentd9df809838191962a82e98ff01aaaa73950ba670 (diff)
Move info.toml to rustlings-macros/
This improves the experience for contributors on Windows becuase Windows can't deal with git symbolic links out of the box…
Diffstat (limited to 'src/info_file.rs')
-rw-r--r--src/info_file.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/info_file.rs b/src/info_file.rs
index dbe4f08..14b886b 100644
--- a/src/info_file.rs
+++ b/src/info_file.rs
@@ -2,6 +2,8 @@ use anyhow::{bail, Context, Error, Result};
use serde::Deserialize;
use std::{fs, io::ErrorKind};
+use crate::embedded::EMBEDDED_FILES;
+
// Deserialized from the `info.toml` file.
#[derive(Deserialize)]
pub struct ExerciseInfo {
@@ -47,7 +49,7 @@ impl InfoFile {
.context("Failed to parse the `info.toml` file")?,
Err(e) => {
if e.kind() == ErrorKind::NotFound {
- return toml_edit::de::from_str(include_str!("../info.toml"))
+ return toml_edit::de::from_str(EMBEDDED_FILES.info_file)
.context("Failed to parse the embedded `info.toml` file");
}