rustlings/src/dev/check.rs

17 lines
352 B
Rust
Raw Normal View History

2024-04-16 02:30:28 +01:00
use std::fs;
2024-04-15 22:54:57 +01:00
2024-04-16 02:30:28 +01:00
use anyhow::{Context, Result};
use crate::{info_file::InfoFile, init::cargo_toml};
pub fn check(info_file: InfoFile) -> Result<()> {
// TODO: Add checks
fs::write("Cargo.toml", cargo_toml(&info_file.exercises))
.context("Failed to update the file `Cargo.toml`")?;
println!("Everything looks fine!");
Ok(())
2024-04-15 22:54:57 +01:00
}