From 86095df8b219510bf5cfb9f5d672695bd8b889c6 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 29 Jan 2026 22:37:03 +0100 Subject: run: show the exercise's lessons at the end MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- crates/cli/src/run.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crates/cli/src') diff --git a/crates/cli/src/run.rs b/crates/cli/src/run.rs index 5f06870..0262515 100644 --- a/crates/cli/src/run.rs +++ b/crates/cli/src/run.rs @@ -535,7 +535,12 @@ fn run_exercises(exercises: Vec) -> bool { // (i.e. refresh the 'updated_at' date). This way, next time we select // exercises to show the user, we can prevent this one showing up first. if accepted_diff(&solution, &exercise.solution) { - let _ = touch_exercise(exercise); + let _ = touch_exercise(&exercise); + } + + let lessons = exercise.lessons.trim(); + if !lessons.is_empty() { + println!("The lessons for this exercise were:\n{}", lessons); } } -- cgit v1.2.3