From 9c5da7c258a49d911b20629be6b4ef426d4f431e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 8 Jun 2026 22:04:37 -0700 Subject: Renamed the view functions to render. --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 208cea1..4ebb643 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -195,7 +195,7 @@ impl Crimtag { } } - pub fn view_partial(&self, view: &str, input: &Value ) -> Result { + pub fn render_partial(&self, view: &str, input: &Value ) -> Result { if let Some(view) = self.views.get(view) { return view.process( input ) } else { @@ -203,11 +203,11 @@ impl Crimtag { } } - pub fn view(&self, view: &str, input: &Value ) -> Result { + pub fn render(&self, view: &str, input: &Value ) -> Result { if let Some(view) = self.views.get( view ) { let output = view.process( input )?; if let Some(l) = &view.layout { - self.view( l, &output ) + self.render( l, &output ) } else { if let Value::Dictionary(mut d) = output && let Some(content) = d.remove("content") && @@ -315,7 +315,7 @@ Now with explicit outputs: println!("Error: {:?}", e ); } else { println!("It finished"); - if let Ok(v) = ct.view( + if let Ok(v) = ct.render( "index", &Value::Dictionary( HashMap::from([ -- cgit v1.2.3