introduce the use of anyhow to no longer use panic

This commit is contained in:
2025-10-11 14:35:29 -07:00
parent 449eb85ab8
commit fc239ea54d
14 changed files with 121 additions and 84 deletions

View File

@@ -1,4 +1,5 @@
use crate::context::Context;
use crate::context::SproutContext;
use anyhow::Result;
use serde::{Deserialize, Serialize};
use std::rc::Rc;
@@ -8,6 +9,7 @@ pub struct PrintConfiguration {
pub text: String,
}
pub fn print(context: Rc<Context>, configuration: &PrintConfiguration) {
pub fn print(context: Rc<SproutContext>, configuration: &PrintConfiguration) -> Result<()> {
println!("{}", context.stamp(&configuration.text));
Ok(())
}