mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 21:20:17 +00:00
rearrange configuration to be closer to where it's consumed
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
use crate::config::PrintConfiguration;
|
||||
use crate::context::Context;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::rc::Rc;
|
||||
|
||||
#[derive(Serialize, Deserialize, Default, Clone)]
|
||||
pub struct PrintConfiguration {
|
||||
#[serde(default)]
|
||||
pub text: String,
|
||||
}
|
||||
|
||||
pub fn print(context: Rc<Context>, configuration: &PrintConfiguration) {
|
||||
println!("{}", context.stamp(&configuration.text));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user