mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-01 07:53:30 +02:00
Update Cargo.toml on dev check
This commit is contained in:
+14
-3
@@ -1,5 +1,16 @@
|
||||
use anyhow::Result;
|
||||
use std::fs;
|
||||
|
||||
pub fn check() -> Result<()> {
|
||||
todo!()
|
||||
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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user